Creates a shortcode to display the date/time when a post/page was last updated (with optional formatting).
Author: | bitacre (profile at wordpress.org) |
WordPress version required: | 2.8 |
WordPress version tested: | 4.4 |
Plugin version: | 1.0.1 |
Added to WordPress repository: | 13-04-2012 |
Last updated: | 01-01-2016
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 100 |
Rated by: | 10 |
Plugin URI: | http://shinraholdings.com/plugins/last-update... |
Total downloads: | 13 284 |
Active installs: | 1 000+ |
Click to start download
|
Creates the [lastupdated]
shortcode to display the date and/or time of the last update to a post or page. If used without any arguments, it will display the date in the format configured in the Settings > General tab. It supports several optional arguments: format, before, and after. These options allow you to change how the date/time is formatted and if anything should appear before or after the date/time is displayed.
Screenshots
The default text that will be displayed when using the shortcode with no arguments [lastupdated].
FAQ
What is the shortcode?
You can use either [lastupdated]
or [lastupdate]
, they both work identically.
What formatting options can I use
You can use any of the special date variables listed at this WordPress codex page. If you want to insert plain text (like the word “at” for instance) escape each letter with a backslash, \l\i\k\e \t\h\i\s.
How do I insert this in theme files?
Just wrap the shortcode in <?php do_shortcode( ); ?>
. So to get the default display, just insert <?php do_shortcode( [lastupdated] ); ?>
Why did you make this?
Everyone likes a good shortcode!
Can I change the shortcode?
Yes, just open last-updated-shortcode.php
and add or change what text you want to trigger the shortcode in on of the arrays near the bottom. If this gets any kind of popularity, I’ll make that easier by adding an options page.
Can you add this feature I just thought of?
Can I? Yes. Will I? Yes, if I think it would be a helpful addition. I’m trying to keep things clean and simple, but there’s always room for improvement, so let me know if you think a feature is lacking!
ChangeLog
1.0.1
- Purely cosmetic update for WordPress 4.4
1.0.0
- First released version.
- There may still be bugs, but I can’t find any.