Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1421511

    Hi, is there a possibility to have the hamburger menu just on the homepage? All other sites should show the normal text based menu.

    Thx a lot in advance!

    #1421562

    Hi WebbR,

    Is the hamburger menu on desktop or only in mobile?

    Best regards,
    Nikko

    #1421592

    use that filter : avf_burger_menu_active

    function custom_burger_menu_active( $active, $context ){
      if( is_page(3) ) {
        return true;
      }
      return $active;
    }
    add_filter('avf_burger_menu_active', 'custom_burger_menu_active', 10, 2 );

    change the is_page to your homepage id or use is_home( ) or is_frontpage( )
    (yes there are differences between them – wheather the landing page is blog page or static page ;)

    #1421646

    @Guenni007 Yeah! Thanks! That’s what I was looking for! I suppose the number in if( is_page(3) ) can be an array also?

    @Nikko
    question regarding only desktop view. Mobile should be hamburger menu anyway.

    Thank you!

    #1421665

    Yes of course:

    function custom_burger_menu_active( $active, $context ){
      if(is_page(array( 3, 81))){  
        return true;
      }
      return $active;
    }
    add_filter('avf_burger_menu_active', 'custom_burger_menu_active', 10, 2 );
    #1421670

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

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