• Resolved bobo_kbg

    (@bobo_kbg)


    Hi all,

    I have big issue. I search a lot on internet but didn’t found answer.

    The problem is that every single menu item I add – category, custom link etc. i showing awso as an empty post on my front page – my front page is my default blog page.

    I used custom post type plugin before but I deactivated it and delete all custom post types I created before.

    How can i stop this and what would cause it?

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

    (@bobo_kbg)

    Found the problem in functions.php :

    Just remove some old code:

    /**
    * Custom Post Type Listing Issue.
    */

    add_filter(‘pre_get_posts’, ‘query_post_type’);
    function query_post_type($query) {
    if(is_category() || is_tag() || is_home() && empty( $query->query_vars[‘suppress_filters’] ) ) {
    $post_type = get_query_var(‘post_type’);
    if($post_type)
    $post_type = $post_type;
    else
    $post_type = array(‘post’,’freebies’,’nav_menu_item’);
    $query->set(‘post_type’,$post_type);
    return $query;
    }
    }

Viewing 1 replies (of 1 total)

The topic ‘Menu items apears as post’ is closed to new replies.