Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #1522481
Multiple menu
Closed

Comments

  • Karan started the conversation

    How can i have different menu for saperate pages. As ill be having 3 one pagers and will like all this to have its own menu.

  •  7,092
    Oliver replied

    Hi,

    pls. take a look:

    http://webcusp.com/different-wordpress-menus-to-different-pages-and-categories-plugins/

    Or you can use this filter:

    function thegem_custom_wp_nav_menu_args($args) {
        if(in_array(get_the_ID(), array(555))) {        
        if($args['theme_location'] == 'top_area') {            
            $args['menu'] = 1000;        
        }    
    }        
    if(in_array(get_the_ID(), array(666))) {    
        if($args['theme_location'] == 'primary') {            
            $args['menu'] = 1001;        
        }    
      }    return $args;
    }
    

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • Karan replied

    Hi,

    Where do i paste the code?

  • Karan replied

    Ok so i realized that is has to be pasted in the function.php. But it is not working i changed 666 to page id and 1000 with menu id. i ids were " page id:25907 menu id:92. So where can i find the correct page id.

    And do i need to add the code after <?php or before it



  •  7,092
    Oliver replied

    Hi,

    pls. provide the wp-admin and FTP access.

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver