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

14655 reviews 1734 hosting providers

Questions & Answers

WordPress/ all my category posts show on my homepage as well

Feb 16, 2013 by Susan3
Hi all..
I have a home page and 2 additional pages. I made categories and so far everything I was posting was going to the home page. Then added a template with a different category to go on the other page. Now when I make a post on this new page, the posts appears on the home page as well. How do I make the post shows only on my new page and not the home page (depending on the category)
Can anyone please help?

2 Answers

0 votes
Feb 16, 2013 by expert
In your page.php file or index.php file add the following line
<?php global $query_string; query_posts( $query_string . '&cat=-4,7'); ?>
(4 and 7 being the category ID that you don’t want to show in the home page)
0 votes
Feb 16, 2013 by WebGuru