Tagged: Burger Menu
-
AuthorPosts
-
April 10, 2018 at 2:51 pm #939888
Hello Kieresi Team!
My burger menu is just an empty page and has no menu items in it.
I have some modifications in my theme’s functions.php and some CSS rules @ my child theme.
What am I tried?
Disable plugins -> Not working
Switch to parent theme -> Burger menu works
Child theme with basic functions.php -> Not working
Child theme without custom CSS rules -> Not working
Custom rules in parent theme’s custom.css -> Burger menu works
Cache basically disabled, but erased many times -> Still not working
Compared my HTML output with Enfold 2017 demo and seems my burger menu not loads menu items. The #av-burger-menu-ul is empty in my case
The site is here: http://195.201.1.25/I don’t know it’s related or not but I’m added support in CSS for iPhones but iDevices not renders my Child Theme’s CSS.
Here is my functions.php:
<?php /* * Add your own functions here. You can also copy some of the theme functions into this file. * WordPress will use those functions instead of the original functions then. */ //Remove query strings function _remove_script_version( $src ){ $parts = explode( '?', $src ); return $parts[0]; } add_filter( 'script_loader_src', '_remove_script_version', 15, 1 ); add_filter( 'style_loader_src', '_remove_script_version', 15, 1 ); //Extra fonts add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Robot Slab'] = 'Roboto Slab:400,400italic'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Roboto'] = 'Roboto:100,300,400,400italic,500,700,900'; return $fonts; } //Search form shortcode function bigfootsearchform( $form ) { $form = '<form role="search" method="get" target="self_" id="searchform" action="' . home_url( '/' ) . '" > <div> <input type="text" class="search-text" placeholder="Keresés" value="' . get_search_query() . '" name="s" id="s" /> </div> </form>'; return $form; } add_shortcode('bigfootsearch', 'bigfootsearchform'); // Function that will return our WordPress menu function menu_function($atts, $content = null) { extract(shortcode_atts(array( 'name' => null, ) , $atts)); return wp_nav_menu(array( 'menu' => $name, 'echo' => false )); } // Create the shortcode add_shortcode('menu', 'menu_function'); //Register new sidebars function arphabet_widgets_init() { register_sidebar( array( 'name' => 'Footer Big Socket', 'id' => 'footer-big-socket', 'before_widget' => '<div>', 'after_widget' => '</div>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>', ) ); } add_action( 'widgets_init', 'arphabet_widgets_init' ); //Change logo on scroll when transparent header enabled add_filter('avf_logo_subtext', 'kriesi_logo_addition'); function kriesi_logo_addition($sub) { $sub .= '<img src="/wp-content/uploads/2018/02/dandy-logo-edited-secondary-res.png"/>'; return $sub; } //Hide header on scroll function add_hide_header(){ ?> <script> jQuery(window).scroll(function(){ if(jQuery(this).scrollTop() > 200) jQuery('#top #header_meta').fadeOut('1000'); if(jQuery(this).scrollTop() < 200) jQuery('#top #header_meta').fadeIn('1000'); }); </script> <?php } add_action('wp_footer', 'add_hide_header'); // header transparency logo switch function add_custom_script(){ ?> <script> (function($){ var win = $(window); win.scroll(function() { if(win.scrollTop() == 0) { $(".av_header_top:not('av_header_transparency') .logo img").css('display', 'block').css('ease-in', '0.9s'); $(".av_header_top:not('av_header_transparency') .subtext img , #menu-item-474 , #menu-item-475, #menu-item-476, .responsive #top .cart_dropdown, #menu-item-search").css('display', 'none').css('transition', 'cubic-bezier(0.15, 0.47, 0.45, 0.94) 0.9s'); } else { $(".av_header_top:not('av_header_transparency') .logo img").css('display', 'none'); $(".av_header_top:not('av_header_transparency') .subtext img , #menu-item-474 , #menu-item-475, #menu-item-476, .responsive #top .cart_dropdown, #menu-item-search").css('display', 'block').css('transition', 'ease-in 0.9s'); } }); })(jQuery); </script> <?php } add_action('wp_footer', 'add_custom_script'); //Disable TMCE html formatting remove_filter( 'the_content', 'wpautop' ); add_filter('tiny_mce_before_init', 'modify_valid_children', 99); function modify_valid_children($settings){ $settings['valid_children']="+a[div|p|ul|ol|li|h1|span|h2|h3|h4|h5|h5|h6]"; return $settings; } function fix_tiny_mce_before_init( $in ) { // You can actually debug this without actually needing Advanced Tinymce Config enabled: // print_r( $in ); // exit(); $in['valid_children']="+a[div|p|ul|ol|li|h1|span|h2|h3|h4|h5|h5|h6]"; $in[ 'force_p_newlines' ] = FALSE; $in[ 'remove_linebreaks' ] = FALSE; $in[ 'force_br_newlines' ] = FALSE; $in[ 'remove_trailing_nbsp' ] = FALSE; $in[ 'apply_source_formatting' ] = FALSE; $in[ 'convert_newlines_to_brs' ] = FALSE; $in[ 'verify_html' ] = FALSE; $in[ 'remove_redundant_brs' ] = FALSE; $in[ 'validate_children' ] = FALSE; $in[ 'forced_root_block' ]= FALSE; return $in; } add_filter( 'tiny_mce_before_init', 'fix_tiny_mce_before_init' ); //Enable shop page editor add_theme_support( 'avia_custom_shop_page' ); add_action( 'ava_main_header', 'enfold_customization_header_widget_area' ); function enfold_customization_header_widget_area() { dynamic_sidebar( 'Extra Header' ); }
Do You guys have any idea what cause this?
Thank You if help me!
Best Regards, Csaba!
April 11, 2018 at 10:51 am #940397Hey Nagytalp,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( do be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.Best regards,
NikkoApril 11, 2018 at 12:59 pm #940474This reply has been marked as private.April 13, 2018 at 9:53 am #941372Hi,
Thank you for the info.
We tried to edit the menu but we got the following errors. Please deactivate the plugins temporarily then check the Appearance > Menus panel again.
load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-droppable,wp-ajax-response,jquery-color,wp-lists,postbox,nav-menu&ver=4.9.5:2)
nav-menus.php Failed to load resource: the server responded with a status of 500 (Internal Server Error)Best regards,
IsmaelApril 18, 2018 at 9:15 am #943498Hi,
I’m narrowed the problem. First of all thank you for the feedback about the admin side menu error. It causes the payment gateway plugin. But it’s independent about the burger menu problem.
Seems like burger menü doesn’t works because of style.css and I think it’s maybe related to the script which is changing some elements on scroll.
I found this on the forum and expanded:
// header transparency logo switch function add_custom_script(){ ?> <script> (function($){ var win = $(window); win.on('scroll', function() { if(win.scrollTop() == 0) { $(".av_header_top:not('av_header_transparency') .logo img").css({ 'display' : 'block', 'transition' : 'ease-in 0.9s' }); $(".av_header_top:not('av_header_transparency') .subtext img, #menu-item-474 , #menu-item-475, #menu-item-476, .responsive #top .cart_dropdown, #menu-item-search").css({ 'display' : 'none', 'transition' : 'cubic-bezier(0.15, 0.47, 0.45, 0.94) 0.9s' }); } else { $(".av_header_top:not('av_header_transparency') .logo img").css('display', 'none'); $(".av_header_top:not('av_header_transparency') .subtext img , #menu-item-474 , #menu-item-475, #menu-item-476, .responsive #top .cart_dropdown, #menu-item-search").css({ 'display' : 'block', 'transition' : 'ease-in 0.9s' }); } }); })(jQuery); </script> <?php } add_action('wp_footer', 'add_custom_script');
How can I define the max width where script is runing? I’m tried few solutions what found it on Stack Overflow but nothing works well.
So I think burger menu problem is related to this code’s CSS part.Best regards,
Csaba- This reply was modified 6 years, 8 months ago by Nagytalp.
April 20, 2018 at 2:58 am #944374 -
AuthorPosts
- You must be logged in to reply to this topic.