WordPress.org

Ready to get started?Download WordPress

Forums

How do I publish posts, but have not appear on frontpage (9 posts)

  1. hmuamer
    Member
    Posted 6 years ago #

    I tried searching for solutions to my little questions, but I just didn't find anything.

    Here is my question. Is it possible in WordPress to Publish a post and have it not appear on the frontpage, you would just have a link to the post.

    I am trying to publish several posts that would only have links from a separate post that WOULD appear on the frontpage.

    Is there somekind of a plugin or something that would do the trick.

    Thank you in advance

  2. moshu
    Member
    Posted 6 years ago #

    You can exclude posts from appearing on the front/main page - based on categories, by using a plugin, like
    http://www.fidgeting.net/wordpress-plugins/ultimate-category-excluder/
    http://ryowebsite.com/wp-plugins/category-visibility/

    If the exclusion is not category-based... I have no idea.

  3. Chris_K
    Member
    Posted 6 years ago #

    If not category based, consider custom field based.

  4. moshu
    Member
    Posted 6 years ago #

    Cool little trick! :)

  5. hmuamer
    Member
    Posted 6 years ago #

    That would be a cool trick if my theme would support it.

  6. hmuamer
    Member
    Posted 6 years ago #

    I think i solved my problem by categorizing the post that I want to exclude, then just use the 'category visibility' plugin to hide all the post.

  7. Chris_K
    Member
    Posted 6 years ago #

    Your theme would support it if you read the entire post about the necessary couple lines of code to add.

    The category visibility plugins are a great way to go, however.

  8. blogsnapper
    Member
    Posted 6 years ago #

    Another way of excluding one or more categories from the home page is to add a small piece of code in your template (index.php etc).

    Look for (should be somewhere between line 1-20):
    <div class="post" id="post-<?php the_ID(); ?>">
    Insert this directly above:
    <?php if ((in_category(1) || in_category(2)) && is_home() ) continue; ?>

    Explanation:
    The code in this example looks for posts from categories with id 1 and 2. If they exist and the visitor are on the home page (is_home), they are hidden.
    If the visitor are viewing another category page than home, the posts will be visible.

    Exclude one category only?
    If you only want to exclude/hide one single category from the home page, use this code instead:
    <?php if (in_category('1') && is_home() ) continue; ?>

    Remember!
    Hiding a category won't make it invisible to the system. If you have specified to show 10 posts in a category page and 3 of the posts are hidden (as described above), the total amount of visible posts will be 7. The system will not add three new posts from the archive since it consider it allready shows 10 (as defined in dashboard). More advanced code is needed to accomplish this.

    This solution has been tested in WordPress 2.5

    Enjoy,
    //Blogsnapper

  9. Verily
    Member
    Posted 5 years ago #

    Hiding a category won't make it invisible to the system. If you have specified to show 10 posts in a category page and 3 of the posts are hidden (as described above), the total amount of visible posts will be 7. The system will not add three new posts from the archive since it consider it allready shows 10 (as defined in dashboard). More advanced code is needed to accomplish this.

    Any hints on where to start with that more advanced code? I'm trying to figure out how to fix the display, but I'm afraid I'm only a beginner at programming, and I'm getting lost trying to figure out where to begin modifying the plugin I have to do just this.

Topic Closed

This topic has been closed to new replies.

About this Topic