HemmingWay Modification (2 posts)

  1. atraeyu
    Posted 9 years ago #

    Hemmingway, by default, displays two posts:

    // Here is the call to only make two posts show up on the homepage REGARDLESS of your options in the control panel
    <?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>
    <?php $first = false; ?>
    <?php endwhile; ?>
    <?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
    Posted 9 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


No tags yet.