Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14318 reviews 1707 hosting providers

Questions & Answers

How to to exclude a WordPress category from index/blog page

Dec 7, 2012 by DinoGuy
I am using a category for a page, and I want exclude the posts of this category  from the main blog page.
Right now I am using this :<?php query_posts($query_string . '&cat=-4'); ?> But it this didn’t work as desired. Does anyone here know how to achieve this?
Thank you all

1 Answer

0 votes
Dec 7, 2012 by WebGuru
Try checking the value of the  $query_string. Use WP_Query instead