October 9, 2012

How to Prevent Posts From a Particular Category to be Displayed in WordPress Loop

Do you need to exclude a particular category of posts from display on the WordPress loop? If yes, here is a handy code snippet to do so. Paste the code below into your functions.php file. Don’t forget to update the code with the category ID you want to exclude (on line 4)

Related Articles:

[related_posts]

Related Post

Ajax in the WordPress Dashboard – Laying the Fou... Not long ago, Ajax was all the rage – the idea of updating part of a page without actually needing to reload the entire page was awesome, remember? ...
10 Things to Hate About WordPress (And How to Fix ... I love WordPress, but I don’t love everything about it. I think it’s the best way to build a website for most people, but like any piece of softwa...
Podium – A New Responsive Speaking Events Pr... Podium is a new premium WordPress theme. It can be used to power an event organisers website to generate interest in workshops, creative conferenc...
Don’t Be Shy to Use sprintf with WordPress You might think escaping the permalink and the post title is not necessary, and you’re right. However, it’s considered best practice to escape as ...

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Pin It on Pinterest

Share This