Forums

Older Entries Page-Post appears sticky, but isn't... (5 posts)

  1. CQSite
    Member
    Posted 1 month ago #

    So I've been having this issue for a while...And the post is not accidentally sticky. Whatever is the latest post appears at the top of the 'older entries' page...Ex: When you click to see archives, the most recent post appears as top post.

    Site is
    http://thecinnamonquill.com/blog/
    Older entries: http://thecinnamonquill.com/blog/?paged=2

    Any idea what might be causing this?

    Thanks...
    Jenn

  2. MichaelH
    moderator
    Posted 1 month ago #

    With the help of the Template Hierarchy article, determine what Template is displaying your posts (likely index.php), then paste the content of that template in a pastebin [1] and report the link back here.

    [1] wordpress.pastebin.ca

  3. CQSite
    Member
    Posted 1 month ago #

    Thank you for replying; hopefully I did this correctly:

    http://wordpress.pastebin.ca/1622063

  4. CQSite
    Member
    Posted 1 month ago #

    any ideas?

  5. MichaelH
    moderator
    Posted 1 month ago #

    You have a whole section of code that display your most recent post at the top of your posts display...the code begins with <div class="recent"> and ends with </div><!--recent--> so you could delete just that section.

    But if you must keep that section then you want to put an if statement around that code, something like:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    if ($paged == 1) {
    ?>
    <div class="recent">
    .
    .
    .
    </div><!--recent-->
    <?php
    }
    ?>

    If you keep that code you might consider changing the query to:

    <?php $my_query = new WP_Query('showposts=1&caller_get_posts=1');

    so you don't get stickies included...just in case you use stickies in the future.

Reply

You must log in to post.

About this Topic