Forums

[resolved] hiding from home page (6 posts)

  1. groan
    Member
    Posted 2 years ago #

    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?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    does such a beast exist?

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

  3. dakranii
    Member
    Posted 2 years ago #

    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?

  4. groan
    Member
    Posted 2 years ago #

    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?

  5. groan
    Member
    Posted 2 years ago #

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

    Thanks Esmi or your inspiration.

  6. dakranii
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.