• Hi,

    I need to display a different menu for a certain category AND posts within that category. I have been looking for a code or plugin (although I would rather use code) and can’t seem to find something that will display the new primary nav for posts within the category, only the category page itself. I tried this code and it did nothing.

    <?php
    if(has_nav_menu('primary'))
    {
    }
       if(is_category(meijer-2)){
        $locationMenu=meijer
    ?>
    <?php
                    wp_nav_menu( array(
    			'menu' => $locationMenu,
                            'theme_location'=> 'primary',
                            'container'     => false,
                            'menu_id'       => 'nav',
                            'fallback_cb'   => 'wp_page_menu'
                        ) );
    } else
    ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Conditional Menu for Posts Within Category’ is closed to new replies.