Sometimes you need to show current date on your page or post of WordPress blog.
You can often see it on affiliate products pages. It makes your website look current and like it’s updated daily.
Here is step-by-step guide how to do that:
1. Add to functions.php code below (copy and paste it at the end of file)
// [date]
function displaydate(){
return date(‘l, F jS, Y’);
}
add_shortcode(‘date’, ‘displaydate’);
// end date
2. To insert current date anywhere in WordPress blog insert this shortcode:
[date]
{ 1 comment… read it below or add one }
Cool tip! I’ve been looking for this code. Some themes display it but majority of wp themes don’t have this.
Leave a Comment