-
AuthorPosts
-
November 23, 2015 at 4:24 pm #540993
Hi,
When I view my site on mobile it shows the mobile menu button. But once I click on it, the menu doesn’t show. Interestingly, the “close menu” button does appear.
Here is the link to my site: http://www.lovelifesolved.com/
I have already deactivated all plugins, cleared the cache, checked if anything in the functions.php of my child theme caused the error, but no results. I have tested it on several IOS devices. Browsers: Chrome, Safari. (both up to date)
I’d be thankful for any help.
Thx!
JulianNovember 23, 2015 at 5:59 pm #541065Hi aIVIis!
Your link redirects me to the WordPress login.
Best regards,
ElliottNovember 23, 2015 at 6:05 pm #541070Hey,
Sorry! You should be able to access the site now.
November 23, 2015 at 10:33 pm #541217Hey!
I see what you mean. It looks like your using Enfold 3.3.2. Go ahead and update to the latest version, 3.4.4, and let us know when your done.
Best regards,
ElliottNovember 24, 2015 at 2:05 pm #541607Hey Elliott,
I updated to 3.4.4 but nothing changed. Could you please take another look?
Best,
Julian
November 24, 2015 at 10:00 pm #541958Hi!
Let’s try the following.
1. Deactivate all plugins.
2. Completely delete Enfold from your WordPress theme directory before downloading + uploading a fresh copy from themeforest.
I believe after doing the above two steps the problem will be gone but if your still having issues after that send us a WordPress login and we’ll take a closer look.
Cheers!
ElliottNovember 25, 2015 at 2:04 pm #542421Did everything you told me but the problem still persists. In addition I found following error below the footer:
“Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘add_custom_script’ not found or invalid function name in /home/lovelife/public_html/wp-includes/plugin.php on line 503”Could you please take a look?
November 26, 2015 at 6:26 am #542857Hi,
I couldn’t see any error messages but I can see the problem, do we have permission to disable plugins for testing purposes?
Regards,
RikardNovember 26, 2015 at 10:58 am #542982November 26, 2015 at 11:00 am #542983the error message is below the socket. it’s hard to see because it has almost the same color.
November 27, 2015 at 6:42 pm #543772Hey!
The problem seems to be in your child theme. I activated Enfold instead of the child theme and deactivated all plugins (you have quite a few) and the problems went away.
Regards,
ElliottNovember 28, 2015 at 11:58 am #543927Hey Elliott,
That’s good to know, but what can I do now? Could you take a look at my functions.php code?
<?php // ============================================================================= // FUNCTIONS.PHP // ----------------------------------------------------------------------------- // Overwrite or add your own custom functions in this file. // ============================================================================= // Custom Class for every element add_theme_support('avia_template_builder_custom_css'); add_action('wp_footer', 'add_custom_script'); function change_shortcodesjs() { wp_dequeue_style( 'avia-base' ); wp_enqueue_style( 'avia-base-child', get_stylesheet_directory_uri().'/css/base.css', array(), '2', 'all' ); } if(!is_admin()){ add_action( 'wp_enqueue_scripts', 'change_shortcodesjs', 100 ); } function change_aviajs() { wp_dequeue_script( 'avia-default' ); wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true ); } add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 ); add_filter('avf_default_icons','avia_replace_standard_icon', 10, 1); function avia_replace_standard_icon($icons) { $icons['mobile_menu'] = array( 'font' =>'entypo-fontello', 'icon' => 'ue811'); return $icons; } add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) ); add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 ); function enfold_customization_modify_thumb_size( $size ) { $size['entry_with_sidebar'] = array('width'=>854, 'height'=>569); return $size; } ?>
Thx!
November 28, 2015 at 9:45 pm #544015Hey!
Probably this line.
add_action('wp_footer', 'add_custom_script');
I don’t think we have any function named “add_custom_script” and you don’t appear to have any function defined by that name.
Cheers!
ElliottNovember 29, 2015 at 12:07 pm #544127I deleted the line and it solved the error below the footer. The menu still doesn’t appear, however.
December 1, 2015 at 4:36 am #544976Hi!
Why do you have to relocate the avia.js file in the child theme folder? The site is probably using an old version of the file which is why the mobile menu is not working correctly.
function change_aviajs() { wp_dequeue_script( 'avia-default' ); wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true ); } add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );
Best regards,
IsmaelDecember 1, 2015 at 11:36 am #545060The avia.js was in the child-theme folder because I want to display the post title and meta above the feature image. For that purpose I use this code:
jQuery('article.post').each(function(){ jQuery(this).find('.entry-content-header').after(jQuery(this).find('.big-preview').detach()); })
I am using the avia.js file from the 3.4.4 version now and simply added the code to the bottom. Everything is working as it should now.
Thank you very much!
Best,
Julian
December 2, 2015 at 3:12 am #545700 -
AuthorPosts
- You must be logged in to reply to this topic.