shortcode for current year, to be used in footer for copyright dates
Started by
Clifford P
, Apr 22 2012 02:46 PM
9 replies to this topic
#1
Posted 22 April 2012 - 02:46 PM
In this section of PageLines Settings (Header and Footer):
Site Terms Statement (FootCols)
A line in your footer for terms and conditions text or similar
Instead of typing this:
Copyright 2009-2012.
Is there a built-in shortcode to do something like this:
Copyright 2009-[current_year]
?
If not, I think it would be helpful to build one in.
Thank you.
#2
Posted 22 April 2012 - 03:39 PM
There is a WordPress shortcode for displaying the date and time a post was published, but not displaying a current year. There may be a Javascript you can use. I found this one:
I tested it and it worked. Just paste it after Copyright 2009-.
I tested it and it worked. Just paste it after Copyright 2009-.
#3
Posted 23 April 2012 - 04:56 PM
thank you. I think PageLines should add a shortcode to make sure JS is properly added (or just use PHP) and also for it to be easy and better to look at.
#4
Posted 23 April 2012 - 05:05 PM
No need,
#5
Posted 23 April 2012 - 07:08 PM
thanks for the reply, however, I don't see how that's relevant. What should be put in the Site Terms Statement (FootCols) footer text box that displays the current year?
P.S. I tried a short code in there and it didn't work, just displayed the text. So I used Post Snippets (PHP code) to use it in a text widget in that area instead.
#6
Posted 23 April 2012 - 07:11 PM
Well you can add the shortcode from the post i linked in your functions.php file then use it wherever you like.
#7
Posted 23 April 2012 - 07:58 PM
I thought I read it pulls the time of the post though, not the time of the day? Regardless, however a shortcode is created, I put one in that text box area and it didn't work. Have you tried a shortcode in there?
#8
Posted 23 April 2012 - 08:14 PM
I recommend and use it throughout my site. It adds the copyright year, and I've used its variables to automate my magazine sub-masthead (the greyish box below "contents", where this one plugin adds the Volume number, issue, month and year, all with shortcodes.
Javascript is good, but if the visitor to a site has it turned off, they'll see nothing.
#9
Posted 23 April 2012 - 09:07 PM
good one. thx for 2nd-ing my opinion.
#10
Posted 15 June 2012 - 04:38 PM
The site footer box should just be set to do shortcodes, right?











