Tagged: Hamburger-Menu
-
AuthorPosts
-
September 15, 2016 at 3:06 am #686647
Hi,
I love the minimal demo creative studio. I want to use this on a landing page inside our excisting site. Is it possible to implement the hamburger menu only on specific pages?thanks
September 15, 2016 at 10:36 am #686803…I second this idea, having the same. It would be great to choose menu style like transparent / glassy / full header.
September 17, 2016 at 6:28 am #687835Hi!
Thank you for using Enfold.
This option is not available yet but you can use this filter to enable the burger menu on a specific page or pages:
add_action('avf_header_setting_filter', 'avf_header_setting_filter_mod', 9999, 1); function avf_header_setting_filter_mod($header) { if(!is_page(array(13))) return; $header['header_position'] = 'header_top'; $header['menu_display'] = 'burger_menu'; return $header; } //first append search item to main menu add_filter( 'wp_nav_menu_items', 'avia_append_burger_menu', 9998, 2 ); add_filter( 'avf_fallback_menu_items', 'avia_append_burger_menu', 9998, 2 ); function avia_append_burger_menu ( $items, $args ) { if (is_page(array(13)) && (is_object($args) && $args->theme_location == 'avia') || (is_string($args) && $args = "fallback_menu")) { $items .= '<li id="menu-item-burger" class="av-burger-menu-main menu-item-avia-special"> <a href="#"> <span class="av-hamburger av-hamburger--spin av-js-hamburger"> <span class="av-hamburger-box"> <span class="av-hamburger-inner"></span> <strong>'.__('Menu','avia_framework').'</strong> </span> </span> </a> </li>'; } return $items; }
Adjust the value of the is_page() function. Make sure that the “Display of menu items” is set to “text”.
Cheers!
IsmaelSeptember 17, 2016 at 9:48 pm #688014Thanks. Where do i put this? I prefer not to mess with theme code, since it will break with updates.
Do you have a timeframe when this will be implemented in the theme?
September 18, 2016 at 2:55 am #688029Hi,
This code has to be placed in the functions.php file of the theme. There is no timeline as yet as to when this will be implemented.
Best regards,
Jordan -
AuthorPosts
- You must be logged in to reply to this topic.