Title: Simple Question &#8211; Latest Post Link
Last modified: August 19, 2016

---

# Simple Question – Latest Post Link

 *  [djt992](https://wordpress.org/support/users/djt992/)
 * (@djt992)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/simple-question-latest-post-link/)
 * Hi everyone,
 * I use wordpress as a CMS for my website. I find wordpress has been a complete
   revolution to my site and it works great.
 * One question I have though, is I would like to have a link at the top of my page
   which links to the latest wordpress post.
 * It would be very much appreciated if someone could please provide support with
   how to do this?
 * Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [@mercime](https://wordpress.org/support/users/mercime/)
 * (@mercime)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/simple-question-latest-post-link/#post-893208)
 * I assume you designated a Page as the front page for your site. Create a Page
   called Blog and publish. Go to Settings-Reading and choose Blog as your blog 
   page. If you have wp_list_pages in your navigation, Blog link will appear there.
 *  Thread Starter [djt992](https://wordpress.org/support/users/djt992/)
 * (@djt992)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/simple-question-latest-post-link/#post-893229)
 * Thanks for your reply. I don’t really think I explained it very well though..
   I’ll try again.
 * I basically want to display a hyperlink at the top of all the pages throughout
   my website which says something like “Have you read our latest article?” which
   then links to the latest wordpress post.
 * Is this type of hyperlink possible?
 * Thanks again.
 *  [mores](https://wordpress.org/support/users/mores/)
 * (@mores)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/simple-question-latest-post-link/#post-893395)
 * insert this somewhere at the top, ideally in your header.php
 *     ```
       <?php query_posts('showposts=1'); ?>
       <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
       	<p><a href="<?php the_permalink(); ?>">Our latest article: <?php the_title(); ?></a></p>
       <?php endwhile; else: ?><p>no latest article!</p><?php endif; ?>
       ```
   
 *  [jzacsh](https://wordpress.org/support/users/jzacsh/)
 * (@jzacsh)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/simple-question-latest-post-link/#post-893480)
 * [@mores](https://wordpress.org/support/users/mores/):
    Awsome! Thanks a lot, 
   this is just what I needed!
 *  [guillermovelasco](https://wordpress.org/support/users/guillermovelasco/)
 * (@guillermovelasco)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/simple-question-latest-post-link/#post-893550)
 * Hi. Thanks for the solution, it works from the home, but i tryed it from a page
   or a post, and then it loads again the same page or post, not the last post.
   
   Thank in advance. Guillermo
 *  [mikefulton](https://wordpress.org/support/users/mikefulton/)
 * (@mikefulton)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/simple-question-latest-post-link/#post-893570)
 * When I try this code, every page shows the latest post instead of what was intended.
 * Is there perhaps some sort of “push state” and “pop state” functionality available
   for the WordPress engine?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Simple Question – Latest Post Link’ is closed to new replies.

## Tags

 * [hyperlink](https://wordpress.org/support/topic-tag/hyperlink/)

 * 6 replies
 * 6 participants
 * Last reply from: [mikefulton](https://wordpress.org/support/users/mikefulton/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/simple-question-latest-post-link/#post-893570)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
