gholemu
Member
Posted 10 months ago #
Hi all,
I want to add current year next to post title. Not talking about permalinks (year/postname/), but strictly about the title of the post, something like Post Tile - 2011.
I've tried this thing already in the title div, doesn't seem to work: <?php the_time('Y') ?>
Any other suggestions?
Thank you!
gholemu
Member
Posted 10 months ago #
Ok, figured that out, it's working now. But All in One SEO "covers" it in the <title> tag. How can I make it work there aswell?
JamiGibbs
Member
Posted 10 months ago #
This should work:
<div class="title">
<h3><?php the_title(); ?> - <?php the_time('Y'); ?></h3>
</div>
JamiGibbs
Member
Posted 10 months ago #
Do you mean All in One SEO doesn't display the year in the title tag, only the actual title?
gholemu
Member
Posted 10 months ago #
Thanks for your answer.
I've tried the snippet above, it doesn't work, not sure why. I managed to have the year shown in the post title (Post title Year), but not in the browser.
And yes, if I can't have it shown on WP, without AIOSP, then it would be nice to have it in AIOSP.
I'm not sure I'm explaining myself clear enough since I'm not a programmer.
gholemu
Member
Posted 10 months ago #
This is the link (google shortened so it's not indexed by search engines) http://goo.gl/BppYE
I want the year to appear in the browser title, either in WP/theme directly, either in AIOSP.
gholemu
Member
Posted 10 months ago #
Here's what I have now:
<title><?php if (is_home()) : ?><?php bloginfo('name'); ?> - <?php bloginfo('description'); ?>
<?php else : ?>
<?php wp_title('', 'false'); ?> - <strong><?php the_time('Y'); ?></strong>
<?php endif; ?></title>
The title of the post appears on the browser, but the year doesn't.
I've emphasised the year part.
gholemu
Member
Posted 2 weeks ago #
Guess it's not really possible at this point or there's too much work for an experiment. The topic needs to be closed.
Thanks everybody for their support and advices.