Does anyone know of a plugin like this, but kind of in reverse?
What I mean is I'm trying to find a plugin that will prevent a post from showing up on the main page, but will still allow it to show up under Archive, Categories, and Search.
Does anyone know of a plugin like this, but kind of in reverse?
What I mean is I'm trying to find a plugin that will prevent a post from showing up on the main page, but will still allow it to show up under Archive, Categories, and Search.
Hi,
I just set up a "do not display" category and then modified the loop in index.php as follows:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if (in_category('16')) continue; ?>
the do not display category id was 16.
hope this helps
That's really cool. Thanks.
How do you do an "or" in php?
Would it be something like:
<?php if(in_category('16') | in_category('17')) continue; ?>
. . . where 17 is some other category.
I've taken C++, but I don't really know PHP. I'm not that great at C++ either :-(
<?php if( in_category( 6 ) || in_category( 7 ) ) continue; ?>
Hope this helps.
S
You must log in to post.