WordPress Plugin: Latest Post Link

December 31, 2012 —

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 &gt;|</a>`

Example 2: Link with post title included

`<a href="<?php latestpostlink_permalink() ?>" title="Most Recent Post">Latest: <?php latestpostlink_title() ;?> &gt;|</a>`

I wrote this plugin to use with my webcomic. You can see an example of it in use at my webcomic page.

Download Latest Post Link Plugin

2 Comments »

  1. 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.

    Comment by Shaun — January 10, 2013 @ 8:51 pm
  2. 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)

    Comment by Jasmine — May 29, 2013 @ 6:24 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Canada License.
(c) 2024 Ellen Kaye-Cheveldayoff | powered by WordPress with Barecity