How to exclude a category from the loop on your home page in wordpress

wp

In this article i will help you to exclude category from wordpress loop.Just add this Code Snippet to the functions.php file in your current WordPress theme using editor in order to exclude one or more categories from the loop on your home page.

In the above function, the -2, -4, and -10 can be replaced by the Category ID for whichever category or categories you want to exclude from your home page loop. This function above would exclude categories 2, 4, and 10 from the home page.

Hope you enjoy the tutorial.Please subscribe us for latest  updates.

Ashwani Bhatia

Ashwani Bhatia

Highly creative, innovative and multitalented web designer and developer with 9+ years experience in front end development technologies including advanced PHP,HTML5,CSS3, JavaScript, AJAX and Internet Marketing.

You may also like...

Leave a Reply

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


9 + four =

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