Jump to content


Photo
- - - - -

shortcode for current year, to be used in footer for copyright dates


  • Please log in to reply
9 replies to this topic

#1 Clifford P

Clifford P

    Advocate

  • Members


  • 379 posts
  • LocationOklahoma
  • Country: Country Flag

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 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

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:

Please Login or Register to see this Hidden Content


I tested it and it worked. Just paste it after Copyright 2009-.

#3 Clifford P

Clifford P

    Advocate

  • Members


  • 379 posts
  • LocationOklahoma
  • Country: Country Flag

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 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 23 April 2012 - 05:05 PM

No need,

Please Login or Register to see this Hidden Content



#5 Clifford P

Clifford P

    Advocate

  • Members


  • 379 posts
  • LocationOklahoma
  • Country: Country Flag

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 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

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 Clifford P

Clifford P

    Advocate

  • Members


  • 379 posts
  • LocationOklahoma
  • Country: Country Flag

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 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 23 April 2012 - 08:14 PM

I recommend

Please Login or Register to see this Hidden Content

and use it throughout my site. It adds the copyright year, and I've used its variables to automate my magazine sub-masthead

Please Login or Register to see this Hidden Content

(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 Clifford P

Clifford P

    Advocate

  • Members


  • 379 posts
  • LocationOklahoma
  • Country: Country Flag

Posted 23 April 2012 - 09:07 PM

good one. thx for 2nd-ing my opinion. ;)

#10 Clifford P

Clifford P

    Advocate

  • Members


  • 379 posts
  • LocationOklahoma
  • Country: Country Flag

Posted 15 June 2012 - 04:38 PM

The site footer box should just be set to do shortcodes, right?