WordPress Plugin: Latest Post Link
The Latest Post Link plugin for WordPress adds commands that give you the permalink and title of the most recent post.
This plugin adds two specific functions to your WordPress installation:
1. ‘latestpostlink_permalink’ and
2. ‘latestpostlink_title’
They are similar to the ‘the_permalink’ and ‘the_title’ functions that are part of a WordPress installation, except that they refer to only the most recent post in the blog.
Example 1: Link with text saying “Latest >|”
`<a href="<?php latestpostlink_permalink() ?>" title="Most Recent Post">Latest >|</a>` |
Example 2: Link with post title included
`<a href="<?php latestpostlink_permalink() ?>" title="Most Recent Post">Latest: <?php latestpostlink_title() ;?> >|</a>` |
I wrote this plugin to use with my webcomic. You can see an example of it in use at my webcomic page.
Thanks so much for this. I created a new page template & called your function in the html head to act as a redirect. Allowed me to have a menu item of /blog to redirect straight to the latest post.
Thanks again.
Hi, thank you so much for creating this plugin. I’m trying to make a site with a webcomic and a blog with this fancy responsive theme. The latest webcomic is the hard part of doing this.
Your plugin would be the perfect solution if I could specify a category as well. (So that regular blog posts aren’t overriding it with their latest posts)