• Resolved groan

    (@groan)


    Hi!
    I was wondering if there is a way to post an item but not have it show on the main page but only if a person clicks on the category?
    I was hoping there would be a check box to “don’t show on home page”.

    does such a beast exist?

Viewing 5 replies - 1 through 5 (of 5 total)
  • does such a beast exist?

    Not in the native WP install but you might find a plugin that does this.

    Are you talking about excluding every post in the category from the main page or just one single post from that category, but still display other posts from that category on the main page?

    Thread Starter groan

    (@groan)

    I am doing a site for a client and some info he will be posting will be available in categories, but not necessarily displayed on the main page.

    I will create other categories, but would like them to not display on the main page.
    I guess I would need to create pages for this?

    Thread Starter groan

    (@groan)

    Found it.
    http://anappleaday.konceptus.net/posts/wp-hide-post/

    Thanks Esmi or your inspiration.

    You can also do it in code if you don’t want to use a plug-in for it. In the loop on your main index template, after the loop. It would like like this:

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
    <?php if ( in_category('x') && !is_single() ) continue; ?>

    where “x” is the category ID number you don’t want to display.

    This particular line of code also keeps the excluded category post from counting towards the total of posts on your index page.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘hiding from home page’ is closed to new replies.