WordPress.org

Ready to get started?Download WordPress

Forums

HemmingWay Modification (2 posts)

  1. atraeyu
    Member
    Posted 7 years ago #

    Hemmingway, by default, displays two posts:

    <?php
    // Here is the call to only make two posts show up on the homepage REGARDLESS of your options in the control panel
    query_posts('showposts=2');
    ?>
    <?php if (have_posts()) : ?>
    <?php $first = true; ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="story<?php if($first == true) echo " first" ?>">
    <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    <?php $hemingway->excerpt() ?>
    <div class="details">
    <?= _('Posted at') ?> <?php the_time('ga on ' . $hemingway->date_format(true) . '/y') ?> | <?php comments_popup_link('no comments', '1 comment', '% comments'); ?> | Filed Under: <?php the_category(', ') ?> <span class="read-on"><a href="<?php the_permalink() ?>">read on</a></span>
    </div>
    </div>
    <?php $first = false; ?>
    <?php endwhile; ?>
    </div>
    <?php else : ?>
    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>
    <?php endif; ?>

    I need to modify this so that it displays the first post (the oldest) in the blog, then displays the newest post. Anyone have any suggestions?

  2. janofbts
    Member
    Posted 6 years ago #

    The best I can say is to add the WP-sticky plugin and make the oldest a sticky so it stays on the front page for as long as you want it to.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.