How to exclude categories from Recent Posts

Home Forums WordPress Theme Support BresponZive Mag How to exclude categories from Recent Posts

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1195
    chipk1
    Member

    Is there a way do exclude certain categories from showing up in the recent posts section on the home page?

    #1197
    Raja CRN
    Keymaster

    Yes, you can exclude the cat from the recent posts. Please read the WordPress Codex http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters

    Exclude Posts Belonging to Category
    
    Display all posts except those from a category by prefixing its id with a '-' (minus) sign.
    
    $query = new WP_Query( 'cat=-12,-34,-56' );

    For that you need to create custom WP Query for the Recent blog loop.

Viewing 2 posts - 1 through 2 (of 2 total)

Only Verified Customer of this Theme Can post reply to this Support Topic! .