Support » Fixing WordPress » Restricting certain categories from the index

  • 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?
    If I want to exclude multiple categories, like writing exercises, from the index, can I do that too?

Viewing 12 replies - 1 through 12 (of 12 total)
  • What you describe seems almost similar to “Asides” (see the Sidebar variant).

    Another approach:

    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.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

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

    Done and done.

    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.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

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

    Use the Category Visibility plugin:

    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!

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

    Sorry for the confusion.

    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.

    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.

    What’s UTW? 🙂 Something I should become acquainted with?

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

    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.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Restricting certain categories from the index’ is closed to new replies.