Forums

Hide categories from main blog view (4 posts)

  1. NialGiac
    Member
    Posted 4 years ago #

    I run a web comic that I maintain using a custom script for navigation. I've created a 'comic' category on my regular blog and everything is working just the way I would like it to. But here's what I'm looking to do, now:

    I'd like to exclude the 'comic' category from my regular blog. Meaning, if a user navigates to /blog/ he'll see the latest article, but never an issue of the web comic unless he specifically selects it from my category list.

    Any help would be appreciated!

  2. NialGiac
    Member
    Posted 4 years ago #

    The documentation suggests the following:

    <?php if (in_category('3')) continue; ?>

    Which will exclude a category from the index listing, but won't that also hide the posts if the user is viewing category 3?

    EDIT: By adding the following:

    <?php if ($cat != 3 && in_category('3')) continue; ?>

    My web comic will only show when its category is selected, however the front page of my blog now fails to show any post! I believe this is because I have my blog configured to only show 1 post per page. Any suggestions?

  3. compartments
    Member
    Posted 3 years ago #

  4. ipoddude
    Member
    Posted 3 years ago #

    You might also want to look at the WPComic theme. It excludes comic posts from regular blog posts.

Topic Closed

This topic has been closed to new replies.

About this Topic