• Does anyone happen to know where an expo on query_posts is to be found please. On Codex it is descibed as coming shortly. (1.5).

Viewing 6 replies - 31 through 36 (of 36 total)
  • Thread Starter Root

    (@root)

    My query ends with the endwhile you have. No php end like yours. Then into the loop.

    My query ends with the endwhile you have. No php end like yours. Then into the loop.

    Sorry, I’m a little confused about what you’re trying to say. If you’re referring to the code <?php } ?> at the end, it belongs to the if(is_home()).

    Thread Starter Root

    (@root)

    Well I am struggling here. I scarcely understand it myself. Sorry.

    chris:

    By ‘sticky’ Root meant ‘a post that stays at the top of the post list’. My CG-PostOrder plugin can ‘reorder’ the normal post list and force a particular post (or posts) to remain at the start of the list. “Sticky” is what most forum systems call such a post that remains at the head. The Adhesive plugin is similar to my PostOrder plugin, though PostOrder was designed to allow multiple ‘levels’ of priority/ordering (thus “post order”).

    I might suffice for your needs, whereas adding a secondary loop complicates things a bit — in my opinion at least.

    I was wondering if Root was referring to a sticky, like a forum sticky. Unfortunately, I need something that looks more like a Page and separates itself from the posts.

    I agree adding a second loop complicates things, and it appears to be because the query object is not reusable. I’m still digging into WP and learning, but I plan on recommending this to the WP developers.

    I don’t understand what you said:
    ” I need something that looks more like a Page and separates itself from the posts. “

    ‘looks more like a Page’
    Pages are html/css just like any other post. Granted, depending on your theme they may be much different base templates. But you can style stuff all you want, with minor tricks (an extra DIV wrapping the posts you care about gives you all the power in the world…).

    ‘separates itself from the posts’
    CG-PostOrder does that, effectively, by putting tagged posts ‘at the top of the list’. Like a forum sticky, yes.

    CG-PostOrder also inserts its own variable into the $post structure, so you can test (and do optional stuff) for Ordered posts. for instance:


    // inside start of post loop
    if (isset($post->postorder)) echo '<div class="sticky">';
    ...
    ... do normal post-loop output ...
    ...
    if (isset($post->postorder)) echo '</div>';

    Then, you can do custom CSS using:
    .sticky {..}

    -d

Viewing 6 replies - 31 through 36 (of 36 total)
  • The topic ‘query posts’ is closed to new replies.