Support » Fixing WordPress » Display single latest post with previous post link

  • 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?

Viewing 1 replies (of 1 total)
  • 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.

Viewing 1 replies (of 1 total)
  • The topic ‘Display single latest post with previous post link’ is closed to new replies.