ThemeShaper Forums » Power Blog


Exclude/include posts in page breaks 'sticky' behaviour

(1 post)
  • Started 12 years ago by horsellian
  1. horsellian

    I'm trying to exclude particular posts from pages of posts.

    I found the following code in the forum:

    function childtheme_above_indexloop() {
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=-3&paged=$paged");
    add_action('thematic_above_indexloop', 'childtheme_above_indexloop');

    This half works, except sticky posts from the excluded category still appear as stickies on the page.

    Since I'm actually trying to separate a category that is written by a single author, I thought I'd try that, so I changed the code to:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("author=-2&paged=$paged");

    However, this also only half works, as now NONE of the sticky posts are sticky anymore.

    I don't really know how to go about fixing this - does anyone have any ideas? I'm guessing this is just peculiar wordpress behaviour rather than anything to do with thematic?

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.