Forums

a 1 category post appear on category archive but not on home page (9 posts)

  1. Hari Seldon
    Member
    Posted 3 years ago #

    How do I make a 1 category post appear on category archive but not on home page?

    I have several entries I don't want to appear on my homepage but to show on th. I need these posts to be in only one category because this is required for the posts from the 'Events Calendar' plugin.

    This would be easy to do by giving the post an oldish "posted" date. But, I want to avoid any possible confusion since these are calendar entries.

    I want to learn the technically optimum standard way to do this. I am currently using the plaintxtBlog theme.

    = = =

    This is somewhat related to a weblog with a calendar I just asked a question about regarding WP-Sticky

    For technical reference, you can see the blog (work in progress today)

    [sig moderated] [sorry it wasn't a signature!]

  2. MichaelH
    Volunteer
    Posted 3 years ago #

    Hari - I moderated that link thinking it was a signature so please repost that if you could. Apologies.

  3. MichaelH
    Volunteer
    Posted 3 years ago #

    You could exclude that category with the exclude= parameter with the template tag, wp_list_categories().

    The archive is a dynamically created thing so you really don't have control over that--just change the wp_list_categories to exclude that category (category ID can be seen by hovering mouse over category name in Manage->Categories.)

  4. Hari Seldon
    Member
    Posted 3 years ago #

    here is the link you asked for
    Away With All Gods Tour

    Understood can exclude a category.

    But cannot exclude a single post from a category? (The post can only have one category.)

    I should be able to solve this by being more creative with the organization of my content.

    Thanks for the second time this morning MichaelH.

  5. MichaelH
    Volunteer
    Posted 3 years ago #

    Oh it's a post you don't want to see--if you know the post_ID of that post you don't want to see, then use the 'post__not_in' parameter from query_posts in your index.php file.

    http://codex.wordpress.org/Template_Tags/query_posts#Post_.26_Page_Parameters

  6. Hari Seldon
    Member
    Posted 3 years ago #

    Simplifying my goal to eliminate all the posts of one category from appearing on the homepage.

    I am using the very well made 'Events Calendar' plugin. I have chosen for it to create a post every time I create an event. I am placing each of those posts in a category named "Schedule".

    I don't want the posts within the "schedule" category to appear on the homepage. But I do want them to appear in a "schedule" category archive page.
    I would prefer if the "Schedule" category appeared in the list of categories but if not, it's not a deal-breaker

  7. Hari Seldon
    Member
    Posted 3 years ago #

    oh. I see it in the link you just provided. Got it. Working . . .

  8. MichaelH
    Volunteer
    Posted 3 years ago #

    Assuming you know the id for the schedule category, then look at The Loop article for excluding all posts from a particular category.

  9. Hari Seldon
    Member
    Posted 3 years ago #

    have to get back to learning my loop later tonight. running to work.

    thanks MichaelH

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.