Forums

[resolved] Page for category that shouldn't show on index (3 posts)

  1. blekfis
    Member
    Posted 1 year ago #

    Using TwentyTen theme and I'd like to have a menuitem that directs to a page with all posts in category ABC (id X). At the same time all posts in this category should be removed from the blogs index-page.

    I found this: http://codex.wordpress.org/Pages#A_Page_of_Posts
    Using that I can create a page that shows all posts from category ABC (some minor issues with styling...), but the posts still show up at the index-page.

    Any solution available? Thankful for all help :)

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

  3. blekfis
    Member
    Posted 1 year ago #

    Thanx Esmi, but I just found a solution

    In loop.php, after row 56 I added
    <?php if (is_home()) if (in_category('9')) continue; ?>

    So now it looks like
    <?php while ( have_posts() ) : the_post(); ?>
    <?php if (is_home()) if (in_category('9')) continue; ?>

    I then created a custom menu with the stuff I wanted and is now happy again :)

Topic Closed

This topic has been closed to new replies.

About this Topic