• NM6

    (@himahuja)


    Hi,

    I added this code in my functions.php to show CPT posts in my archive template:

    function add_custom_types_archive( $query ) {
    if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
    $query->set( 'post_type', array(
     'post', 'destination'
                ));
          return $query;
        }
    }
    add_filter( 'pre_get_posts', 'add_custom_types_archive' );

    I have a CPT by name of “destination” with taxonomy of categories and tags. When I hit on one of the category pages, it shows the CPT posts from that specific category, but the menu disappears. When I click on the logo and go to home page, the menu comes back. I can’t figure out what’s causing the menu to disappear. When I compare the code from home page and archive in Firebug, I see that in the archive/category page, the navbar is not being outputted at all.

Viewing 1 replies (of 1 total)
  • Thread Starter NM6

    (@himahuja)

    Hello,

    The problem is still there. I read through the forums but could not get similar issue. Please help. I’ve put a test site online and here is the link – http://bit.ly/1O5z6hR

    I’ve also updated the theme to its current version.

Viewing 1 replies (of 1 total)

The topic ‘Menu problem in archive page’ is closed to new replies.