• Resolved tsturgell

    (@tsturgell)


    OK, I’ve seen several posts that are similar to this, but not that really seem to provide a clear solution for what I need.

    I need to exclude certain posts from my front page blog – but not from the sidebar widgets.
    I’ve assigned these posts to a specific category (29).

    I can use Advanced Category Excluder or Front Page Excluded Categories to remove the posts from the blog.

    Unfortunately, they are also removed from my sidebar widget (I’m using Category Posts).

    I’m using WP 2.9.1 and the latest versions of each of the mentioned plug-ins as of January 28, 2010.

    Please Help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The Loop article has an example on excluding a category you might find interesting.

    Related:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy
    query_posts()

    Thread Starter tsturgell

    (@tsturgell)

    Perfecto!
    This was easy! Not sure why so many people are asking for this when the solution is fairly simple!
    STEP 1:
    Went to the EDIT feature for my current theme.
    STEP 2:
    Clicked on the “Main Index Template (index.php) in the right hand column.
    STEP 3:
    Find “The Loop” which always starts with something like:
    <?php if (have_posts()) : ?>
    or
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    STEP 4:
    Added this line JUST BEFORE “The Loop”:
    <?php query_posts($query_string . ‘&cat=-19’); ?>

    (my excluded Category was 19, for more than one category use: -3,-19 (separate your categories with commas!)

    That’s it. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Excluding a category from the front page, but not from Widgets’ is closed to new replies.