I dont want certain categories postings to show on the first page, how can I change this?
Appreciate all help!
Thanks
I dont want certain categories postings to show on the first page, how can I change this?
Appreciate all help!
Thanks
Add the following line to Index.php (in your theme) in between the get header and have posts lines. using your categories numbers of course
`<?php get_header(); ?>
<?php query_posts($query_string . "&cat=-23,-20"); //Block categories 20 and 23 from main page ?>
<?php if (have_posts()) : ?>`
Thanks!
Another question about posts; how do i set a limit on how many posts shown on the first page but not limit the number of posts shown when go to a category?
Thanks again
i think there's a limit-post plugin ..not sure.
I installed one out but it didnt work for me.
I will continue to look for it. Thanks
One addendum: I had to insert this additional code to make sure the category pages that linked through index.php didn't also redact the categories I wanted to eliminate from my first page. See below:
<?php
$homepage = "/";
$currentpage = $_SERVER['REQUEST_URI'];
if($homepage==$currentpage) { query_posts($query_string . "&cat=-3,-5"); }
//Block categories 3, 5 from main page
?>This topic has been closed to new replies.