WordPress.org

Ready to get started?Download WordPress

Forums

Restricting certain categories from the index (13 posts)

  1. JPCSTL
    Member
    Posted 8 years ago #

    Gah! I know I've done this before, but I can't for the life of me remember how, and can't find a solution in searching.

    I have categories that I don't want to show up in my index. Instead, I want Updates to show up on the sidebar (the plug-in I'm using seems to do that just fine, and it keeps them off the main blog), and I want Haiku to go to just a page I'm creating for haiku. Now, I've created a page that just shows the haiku, and that works, but the haiku posts (cat=11) still show up in the index (main blog).

    Is there any way to keep them from doing so?
    And
    If I want to exclude multiple categories, like writing exercises, from the index, can I do that too?
    elanstudio.net

  2. Chris_K
    Member
    Posted 8 years ago #

    What you describe seems almost similar to "Asides" http://codex.wordpress.org/Adding_Asides (see the Sidebar variant).

    Another approach: http://mattread.com/projects/wp-plugins/custom-query-string-plugin/

  3. JPCSTL
    Member
    Posted 8 years ago #

    I can't quite picture what an aside looks like from reading the codex page you linked, such that I can't tell what exactly it's doing. Is implementing asides restricting certain categories from my main blog (index) page?

    The plug in doesn't seem to be the trick, as I'm understanding it. I'm not seeing how using it will restrict certain categories from the index page.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    At the top of your index.php file in your theme, put this code:
    if (is_home()) { query_posts("cat=-11"); }

    Done and done.

  5. JPCSTL
    Member
    Posted 8 years ago #

    But this will only allow me to exclude one category, right?

    What I'm wanting to do is have a blog on the main page, full of whatever, multiple categories. But then I want to have categories that will show up ONLY on different pages (one for haiku, one for exercises, etc) but that will NOT show up on the main page.

    So, I have a haiku cat=11, it show up ONLY on my haiku page that is templated to cat=11.

    I have exercises cat=14, it shows up ONLY on my exercises page that is templated to cat=14.

    The updates are already handled by the sidebar aside plugin, so that's done.

    I think I have a handle on how to get the pages to show only the posts of the categories I want (though there is still some question of whether or not Pages or Category Templates is the way to go). It's now a matter of getting those specific categories to NOT show up on the index blog.

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    Multiple categories? Well, you should have said so in the first place then. ;)

    Use the Category Visibility plugin: http://ryowebsite.com/?p=46

  7. JPCSTL
    Member
    Posted 8 years ago #

    YES! Looking at the page, that sure looks like it's exactly what I want. So now I've got categories excluded from the index, Category Templates creating a new look/feel for certain category posts AND getting a list of those pages auto-generated in my sidebar (referring to some other threads I've started here).

    Very very cool. THANKS!

  8. Chris_K
    Member
    Posted 8 years ago #

    doh. and I linked the wrong plugin earlier... /blush

    Sorry for the confusion.

  9. JPCSTL
    Member
    Posted 8 years ago #

    Heh, no worries, we got there eventually, didn't we? Thanks again for the help. I will say, for the sake of the forum/thread, that the Category Visibility plugin doesn't play nice with the Sideblog plugin. I'll have to choose which is more important, and it seems the Visibility one is it.

  10. Chris_K
    Member
    Posted 8 years ago #

    I was a huge sideblog plugin fan at first. But it doesn't play nicely with UTW and a couple others as well.

    Bummer, it was so simple and easy to work with.

  11. JPCSTL
    Member
    Posted 8 years ago #

    What's UTW? :) Something I should become acquainted with?

  12. Chris_K
    Member
    Posted 8 years ago #

    Ultimate Tag Warrior. Pretty popular with folks interested in tagging posts (or creating their own tag clouds even). I quite love it.

    http://www.neato.co.nz/ultimate-tag-warrior/

  13. JPCSTL
    Member
    Posted 8 years ago #

    Oy, I have *NO* clue what tagging posts means or what the first two paragraphs on that page are saying *laughing* Thanks for the info, though. Maybe I'll have a use someday.

Topic Closed

This topic has been closed to new replies.

About this Topic