Support » Fixing WordPress » How to change the main menu on all posts and categories only?

  • Hi,

    I want to change my main navigation to another one on all posts and categories except two categories how can I do this?

    Here are what I have done, it works on localhost but the same code doesn’t work on live site. please have a look and help me to fix this.

    <?php if (is_page('english-blog') or is_page('3939') or !is_page() or is_category()): ?>
     <?php if (!in_category('eth-news') && !in_category('29') && get_post_type() !='avada_portfolio'):?>
      <?php wp_nav_menu(array('theme_location' => 'main_navigation', 'menu' => 'Top', 'depth' => 4, 'container' => false, 'menu_class' => 'top-menu', 'menu_id' => 'top_menu')); ?>
      <?php endif; ?>
    <?php endif; ?>
  • The topic ‘How to change the main menu on all posts and categories only?’ is closed to new replies.