Support » Themes and Templates » Custom menus/headers for different categories

  • Hello!

    I tried to find a solution for this, but I can’t. My problem is that I have a template showing a header with a menu, but I need this menu to be different in each category, and if possible, edit different menus from the wp admin Menu options.

    I also tried to have different headers for writing a manual menu, but I don’t know why can’t I get it.

    An example of the site:

    Thank you very much!

Viewing 5 replies - 1 through 5 (of 5 total)
  • I think you can use Custom menu to do it

    Does your theme support custom menu if then
    create a menu
    and add click Appearance Menus and if you do not see your category box on left click on screen options and tick category now you will see category box add your categories to menu and then add your pages or posts in menu and arrange posts or pages by dragging and moving slightly to right under respective category as you wish.


    Thanks govpatel, but I think that answer is not exactly about what I was asking. I need one menu in one post (category A) and other different menu in other post (category B).

    Any ideas?

    I’ve just done this by combining the new building menu menus with a custom field.

    In the theme I have:

    <?php wp_nav_menu( array( ‘container’ => ‘none’, ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’, ‘menu’ => get_post_meta( $post->ID, ‘MenuName’, true) ) ); ?>

    Then in the page I simply have a custom field called “MenuName”, which is set to match the name of the wordpress nav_menu I want used on that page.

    If a custom MenuName is not defined then it will fall back to the nav_menu assigned to that theme_location.

    That is very cool.

    But how is possible to have two different navigation menus work for two different categories?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom menus/headers for different categories’ is closed to new replies.