Support » Plugins » Hacks » Change the Year

  • I run a website for a fictional newspaper based out of the Everwind series of books. I’ve already changed locale.php to reflect the names of the months and days of the week, but there is a problem. It’s still saying 2012 as the year.

    I’d like to transpose the year 2012 with the year 1336 instead. Ideally it would also recognize that it’s 1337 after New Year’s, etc.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz


    It depends on how your theme displays dates. Many themes indirectly use get_the_date(). Meaning this function might called a few levels down from whatever is called from the template. If your theme does this, you can hook the filter ‘get_the_date’. Your filter function will be passed the date string. Your function can extract the year, subtract 676 or whatever, then replace the real year in the string with the result, then return this modified string.

Viewing 1 replies (of 1 total)
  • The topic ‘Change the Year’ is closed to new replies.