Activity

  • Adam replied to the question Boss Theme XML updated files in the forum Boss. theme 8 years, 5 months ago

    Hello,

    I have now removed the certain blog categories from the blog page (Default blog Page). But I’m not wanting to show the blocked categories from the blog page on another page. These will not display with your code you provided. Is tehre a way to just block it from the default blog page only and let it display on others?

    function exclude_category($query) {
    if ( $query->is_home || $query->is_archive) {
    $query->set(‘cat’, ‘-49 -50’);
    }
    return $query;
    }
    add_filter(‘pre_get_posts’, ‘exclude_category’);

    This is the code I used and cant display the hidden categories on another page.

    regards,

    adam