Friday, April 26, 2013

Exclude certain categories from being displayed in Wordpress

Exclude certain categories from being displayed in Wordpress

Thre are two ways to hide posts from certain categories to be displayed on the wordpress blog. You can either put this code inside the loop

    <?php  
    if ( have_posts() ) : query_posts($query_string .'&cat=-1,-2'); while ( have_posts() ) : the_post(); 
    ?> 
         

or you van use the plugin "Advanced Category Excluder" from wordpress plugin directory.


No comments:

Post a Comment

I just got my #domain @BigRock. Get upto 25% off with my personalized coupon link Get upto 25% off