Lorine
|
Hello.
I`d like to change a post date format to vertical. Earlier it was so easy to change <?php the_time(__('F jS, Y', 'kubrick')) ?> to <div class="PostTime"> <div class="day"><?php the_time('j') ?></div> <div class="month"><?php the_time('F') ?></div> <div class="year"><?php the_time('Y') ?></div>
and style.css. But I can`t find the_time function in the artisteer 3.0 template.
People, could you help me with code for it?
Thanks in advance.
|
|
Clippy
|
I'll look into this, but you really need to get Adeptris on your side - dude's a genius.
|
|
Lorine
|
Anybody, help! This problem is still actual. How can I change the date format to the vertical one in 3.0?? This template is so different from previous.
|
|
Clippy
|
Sorry, I forgot about this post... Time for formatted string fun!
In functions.php, find this:
'<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span>'
and replace it with
'<div class="posttime"><div class="posttime-day">%3$s</div><div class="posttime-month">%4$s</div><div class="posttime-year">%5$s</div></div>'
Remember to include the single quotes.
Immediately underneath, find:
get_the_time()
And add a comma so it looks like this:
get_the_time(),
Underneath this, add the following:
get_the_date('d'),
get_the_date('M'),
get_the_date('Y')
Note that the final string has no comma.
Now, of course, style the .posttime, .posttime-day, .posttime-month, and .posttime-year classes any way you want, perhaps absolute position them and put them in the margin, and you've got (fairly) easy dynamic date icons!
There are a couple other ways of doing this, but this is the only way to make the dates appear on posts headings only, rather than posts, pages, or anything with that particular heading class.
If anyone else has an easier method, please post!
|
|
Lotine
|
Clippy, thank you very much for your answer!! I've done this and everything works. Many-many thanks!
|
|
Clippy
|
No problem! This can be used to great effect in personalizing templates - hopefully something that will be integrated into the program by the time version 4 rolls around.
|
|
|
|