Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #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

    #686803

    …I second this idea, having the same. It would be great to choose menu style like transparent / glassy / full header.

    #687835

    Hi!

    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!
    Ismael

    #688014

    Thanks. 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?

    #688029

    Hi,

    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

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.