WordPress.org

Ready to get started?Download WordPress

Forums

Sticky post didn't show with query_posts (8 posts)

  1. ogonkov
    Member
    Posted 5 years ago #

    I'll query post from catgory with:
    <?php query_posts('cat=46&amp;showposts=1'); ?>

    It will show only one post, and it's always last posted entry. How can i done show sticky post, if he present?

    I will read codex, and find, that it should be done by default. What i done wrong?

  2. ogonkov
    Member
    Posted 5 years ago #

    Sticky Post is in right Category.

  3. ogonkov
    Member
    Posted 5 years ago #

    When i use just cat=46 it's show posts by date, too.

  4. ogonkov
    Member
    Posted 5 years ago #

    bump

  5. ogonkov
    Member
    Posted 5 years ago #

    bump.

  6. techguy
    Member
    Posted 5 years ago #

    I'm having what sounds like a similar problem with a much simpler query. When I do the following:
    query_posts("cat=1");

    Then, it doesn't show the sticky at the top. It still shows the sticky, but not at the top.

    The exclude actually does show the sticky. Like this example:
    query_posts("cat=-28,-30,-31,-29,-8,-11,-10,-9,-12,-13,-14,-15");

    Anyone have an idea on how to get to show the sticky at the top using the top query_posts() ?

  7. techguy
    Member
    Posted 5 years ago #

    Looks like this solution will get just the sticky posts: http://wordpress.org/support/topic/208037?replies=19

    However, I'd be interested in getting the sticky posts and the category posts in the same query. Is this possible?

  8. Covi
    Member
    Posted 4 years ago #

    «However, I'd be interested in getting the sticky posts and the category posts in the same query. Is this possible?»

    [Bump], me too.

    ;)

Topic Closed

This topic has been closed to new replies.

About this Topic