[Support request] How to set different menu to different pages

Home Forums Support [Support request] How to set different menu to different pages

Home Forums Support How to set different menu to different pages

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #490692

    Hello, there are two questions, sorry that I just opened one a ticket.
    1. I would like to use two different menus for two different parts of the page, for example, homepage and other pages using a menu, and when users logged in, will show another menu to logged users, it should be a common question, how can I achieve this?

    2. I have set sticky menu on a homepage, but if I want to set static menu for others, how I should do?
    Thank you for your powerful and extreme lightweight theme.

    GP Premium 1.5.6
    Customer Support

    Hi there,

    1. This might help: https://generatepress.com/forums/topic/login-logout-menu/#post-219830

    2. Try this snippet with your current setting:

    add_filter( 'option_generate_menu_plus_settings','lh_home_only_sticky_menu_setting' );
    function lh_home_only_sticky_menu_setting( $options ) {
    	if ( ! is_front_page() ) {
    		$options[ 'sticky_menu' ] = 'false';
    	return $options;

    Adding PHP: https://docs.generatepress.com/article/adding-php/


    Hi Leo,
    if ( ! is_front_page() ), if I want to deny a specific page except font page? for example, the page id is 898. how should I do? Thank you so much!


    Hi Leo, I have tried to replace the if ( ! is_front_page() ) to if (is_page(60321), that means that I want to set the static menu for the page only which page id is 60321, that works fine now, but mobile devices, could you please give a way to set both desktop and mobile devices? thank you.

    additionally, I just want to fix the menu and header for both mobile and desktop on this page, on a desktop, I add a pice of code like

    z-index: 100;
    position: fixed;
    /* height: 100%; */
    width: 100%;
    padding: 0px;
    border-width: 0px;
    margin: 0px;
    left: 0px;
    top: 0px;

    but on mobile this class may not be right. on a mobile device, what I need to do?


    Customer Support

    Not quite sure what you mean. Can you specify your overall conditional now?

    I think this maybe the look you are going for with the fixed header? https://docs.generatepress.com/article/navigation-logo/#navigation-as-header

    Can you open separate topics for different questions? It’s much easier for us to track what’s going on.

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