Forum Replies Created
-
AuthorPosts
-
Hello Yigit, thank you very much indeed for looking into this. Bizarrely I have gone to take a screenshot and it is all working again. Very confused as I spent a good 30 mins going through server settings and disabling plugins etc. It wasn’t just this machine either, it got reported by a client also on Safari that the front end news items on the homepage were missing. However, as it stands it all seems to be working fine. Can we keep this open for a day or so and see if it re-materialises? Thanks
I am having the same issue whereby certain elements such as images and certain builder elements don’t work. Seems to be down to a Jquery issue. Have installed Jquery migrate helper (as found on an old thread) but this hasn’t fixed it. Disabled all plugins, cache etc and still the same. Currently unable to access the Enfold settings panel either as seems to be powered by jQuery. Site works fine on Chrome, currently Safari seems to be causing the issues.
Mike – thanks so much for that, it worked perfectly.
Much appreciated.
Philip.
Thanks Yigit – unless I have misunderstood – your solution just looks at having different menus (Main nav, top nav, footer etc). This creates a different MAIN Nav for a section based on the conditions of where the page is in the hierarchy.
I am currently trying to hook into the very top nav to do the same. (header_secondary_menu) which I see you have avf_execute_avia_meta_header
You define this as avia2 in the helper-main-menu.php (lines 62-64)
//display the small submenu $avia_theme_location = 'avia2'; $avia_menu_class = $avia_theme_location . '-menu';
So I have modified the following but it doesn’t appear to work. What am I missing?
Thanks
function my_custom_wp_nav_menu_args( $args = '' ) { if($args['theme_location'] === 'avia2') if ( is_child( 'HCP Home' ) ) { $args['menu'] = 'Top Menu HCP'; } elseif ( is_child( 'Patient Home' ) ) { $args['menu'] = 'Top Menu Patient'; } else { //* otherwise set the default as defined in the enfold-child theme as Secondary Menu $args['menu'] = 'avia2'; } return $args;
***SOLVED****
Further to this, for anyone wanting to solve this challenge of having conditional man navigation menus based on the site section, the below set of functions:1. Setup specific menus for your audiences (Patient and HCP in this example)
2. Creates an is_child function that determines if the page has a parent page called something specific (you can also do this by page ID or page slug of the parent but I want to re-use it for other sites so using the page name)
3. Provides the conditional swap logic “my_custom_wp_nav_menu_args” to swap out the main nav and defaults to the Enfold Main Nav otherwise.So to set this up:
Create the following in the child theme functions.php
Create your section home pages
Create your sub-pages and then set their parent page as the section home pageI hope this helps someone.
function register_my_menus() {
register_nav_menus(
array(
‘patient-menu’ => __( ‘Patient Menu’ ),
‘HCP-menu’ => __( ‘HCP Menu’ )
)
);
}
add_action( ‘init’, ‘register_my_menus’ );/**
* Child page conditional
* @ Accept’s page ID, page slug or page title as parameters
* https://sridharkatakam.com/useful-functions-checking-pages-sub-pages-wordpress/
*/
function is_child( $parent = ” ) {
global $post;
$parent_obj = get_page( $post->post_parent, ARRAY_A );
$parent = (string) $parent;
$parent_array = (array) $parent;
if ( in_array( (string) $parent_obj[‘ID’], $parent_array ) ) {
return true;
} elseif ( in_array( (string) $parent_obj[‘post_title’], $parent_array ) ) {
return true;
} elseif ( in_array( (string) $parent_obj[‘post_name’], $parent_array ) ) {
return true;
} else {
return false;
}
}add_filter( ‘wp_nav_menu_args’, ‘my_custom_wp_nav_menu_args’ );
/**
* CManu switch based on page/parent relationship for HCP, Patient or others
* @ Accept’s page ID, page slug or page title as parameters
* PJE – RESOLVE
*/function my_custom_wp_nav_menu_args( $args = ” ) {
if($args[‘theme_location’] === ‘avia’)
if ( is_child( ‘HCP Home’ ) ) {
$args[‘menu’] = ‘HCP’;
} elseif ( is_child( ‘Patient Home’ ) ) {
$args[‘menu’] = ‘Patient’;
} else {
//* otherwise set the default as defined in the enfold-child theme as Main Menu
$args[‘menu’] = ‘avia-menu’;
}
return $args;
}October 23, 2020 at 2:03 pm in reply to: Header: logo centred, burger menu to right, open full screen menu #1255248Hello. If anybody also wants to know this, I managed to get it working
#header .logo {
left: 50%;
transform: translateX(-50%);
z-index:999;
}
#header .logo img {
top: 50%;
transform: translateY(-50%);
max-width: 410px;
}
.avia-menu {float:right;}Hope that helps.
October 23, 2020 at 1:49 pm in reply to: Header: logo centred, burger menu to right, open full screen menu #1255243Hi – anybody there?
October 19, 2020 at 8:28 am in reply to: Header: logo centred, burger menu to right, open full screen menu #1253850Hello, reply in private.
October 17, 2020 at 3:01 pm in reply to: Header: logo centred, burger menu to right, open full screen menu #1253496Hi. Could anyone let me know on the above please? Thanks
October 14, 2020 at 10:02 am in reply to: Header: logo centred, burger menu to right, open full screen menu #1252722Hi Rikard, thanks for your reply. I cannot currently post a link to the site as as it is a staging site and the DNS isn’t available to change just yet to make it public. I am therefore accessing via changing my hosts file. I can send you a visual if you need, and let me know how to get it to you.
But yes, centred logo, but burger menu to the right of the page and then when opened the burger menu full screen.
Currently your config allows for centred logo and menu below (or above) but not to have the burger menu on the right hand side of the page. The CSS to do that would be appreciated.Many thanks
Philip.
March 17, 2020 at 4:23 pm in reply to: Fullwidth Easy Slider – Auto rotate stops working in Safari after a video slide #1193841Great. But how long do you anticipate and is there a temporary work around in the meantime? Otherwise I am having to re-produce a bunch of videos to join them all together, which of course had knock-on ramifications.
Many thanks
March 14, 2020 at 1:34 pm in reply to: Fullwidth Easy Slider – Auto rotate stops working in Safari after a video slide #1193086Hi – was there ever a followup to this as I am having the same problem
- This reply was modified 4 years, 7 months ago by philipe.
Hi – further to my message below yesterday and Rikard’s response, I tested again before I re-opened a new thread on this.
The token process now works ( having not changed anything ).
I can only assume that either there was a caching issue when I originally tried to validate, or there was a connection problem between the servers which has now been fixed, or perhaps the permissions on the token setup were taking time to propagate. Anyway, wait 24 hours or so and tried again and it all works with no changes.
Thanks.
HI there. Could someone please help.
I have manually updated via FTP. I have generated an Envato token. I have (after many attempts) decided to set the token permissions to all. I have tried incognito mode (Private Browsing in Safari). I have deleted the old tokens and then saved, logged out, logged back in, added the token, saved, validated.I still get the same errors: (personal details removed and replaced with XXXXX)
Thanks, Phil.
Last time we checked the token we were not able to connected to Envato:
Purchases could not be accessed
Your username: XXXXX
Your E-Mail: XXXXX
Following errors occured:Purchases: Errorcode 403 returned by Envato: Forbidden:
– response_code: 403
– reason: scope-missing
Purchases: A problem occured accessing your purchases. Unable to check for updates.Thanks for the response Peter.
How would i therefore do this for other ‘objects’ say the icon list object? – there is no ability to add pre and post text on these, so the only option is to put a text block above and a text block below.
Any ideas?
Hi Ismael
Sorry for the slow response.
Seems like there is a clash with CMB Metabox framework https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress
Whenever that is enabled, the ‘add media’ function seems to bug out.
Looks like a JS error, so probably a clash of JQuery or something.
I will investigate further and update this if i find a solution.thanks
Hi
Futher to this i have manged to get some output from Safari error logs (Firefox/Firebug crash out).
After insert into post is pressed, the following is returned:
avia_media.js:141RangeError: Maximum call stack size exceeded.It would seem that there is a clash with AVIA and the cmb_metabox framework on
https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPressas if i disable the function to init the framework, the WP functionality then works to insert a post.
Part of the init.php function is to call the following
function cmb_scripts( $hook ) {
if ( $hook == ‘post.php’ OR $hook == ‘post-new.php’ OR $hook == ‘page-new.php’ OR $hook == ‘page.php’ ) {
wp_register_script( ‘cmb-scripts’, CMB_META_BOX_URL.’jquery.cmbScripts.js’, array( ‘jquery’,’media-upload’,’thickbox’ ) );
wp_enqueue_script( ‘jquery’ );
wp_enqueue_script( ‘jquery-ui-core’ ); // Make sure and use elements form the 1.7.3 UI – not 1.8.9
wp_enqueue_script( ‘media-upload’ );
wp_enqueue_script( ‘thickbox’ );
wp_enqueue_script( ‘cmb-scripts’ );
wp_enqueue_style( ‘thickbox’ );
wp_enqueue_style( ‘jquery-custom-ui’ );
add_action( ‘admin_head’, ‘cmb_styles_inline’ );
}
}Could this be the source of the conflict do you think?
Many thanks for any guidance.
Phil.
-
AuthorPosts