WordPress.org

Ready to get started?Download WordPress

Forums

Display single latest post with previous post link (2 posts)

  1. jimmy_webb
    Member
    Posted 8 years ago #

    I created a new page called News using the single template.

    I would like it to show the latest news item with a navigation link to the previous post. For some reason the previous_post_link('« %link') doesn't work.

    I have a condition at the top:

    if (is_page()) {
    query_posts('showposts=1');
    };

    otherwise it does't display a post.

    Can somebody set me straight on using this loop?

  2. jimmy_webb
    Member
    Posted 8 years ago #

    I've also tried querying multiple posts and then using:

    if (is_page()) {
    break;
    };

    inside of the loop, but it loops through all of the posts.

Topic Closed

This topic has been closed to new replies.

About this Topic