Adding dynamic date to page title tag
-
I’ve been trying to do the following with no success, now I’m wondering if it’s possible.
I have several specific pages that each have a custom title via the “SEO Settings” meta box.
Example title: “Latest News Headlines”
What I want to do is add ” date(‘Y’)” to the end of the custom title so it will automatically change to “Latest News Headlines 2013”, “Latest News Headlines 2014” and so on as the years change.
I’ve tried adding this in the header.php title tag but it doesn’t work, I’m guessing your rewriter looks for the title tag and rewrites it completely?
I also tried echoing the _su_title meta value in header.php, no joy there either.
Is there anything I can add in the SEO Settings meta box that will echo the current year, or some other way?
Thanks
The topic ‘Adding dynamic date to page title tag’ is closed to new replies.