Display current year in tumblr theme

I want to place a copyright expression in the footer of my Tumblr theme, for example, "Acme Co Β© 2013", but I do not want to be updated every year.

You can usually do this with php using date() , which would be nice, but although Tumblr is built on php, I don’t think that end users can use it on the site, although there is an abbreviated scripting language, which I think is compiled into php.

Any idea how I could do this? I thought maybe with js, but search bots don't have js, so what do they see?

+4
source share
2 answers

There is a topic variable in which the period of existence of the daily journal will be displayed - {CopyrightYears}

Returns: 20XX-2013

Link: http://www.tumblr.com/docs/en/custom_themes

+7
source
  <script> document.write(new Date().getFullYear()) </script> 

there you go ... :-)

+1
source

Source: https://habr.com/ru/post/1481253/


All Articles