• I’m using a script for a content area on my index.php template that pulls the last three posts from my site. I made a number of posts sticky, so they would appear on top, but that’s not happening here in this instance.

    Here’s how I’m bringing in the posts:

    <?php
        $myquery = new WP_Query();
        $myquery->query('cat=6&showposts=3');
    ?>
    <?php if ( $myquery->have_posts() ) : while ( $myquery->have_posts() ) : $myquery->the_post(); ?>

    And then I follow it up with standard code to pull in my data like the_title(). Again, it works but it doesn’t respect the sticky posts at all. How can I correct that?

  • The topic ‘My sticky posts aren't appearing at the top using this script’ is closed to new replies.