<?php the_time(‘m/j/y’) ?>
add this before your title, inside the loop.
you also might want to add some span or something to style it.
or this:
<?php the_time(‘d.m.y’) ?>
what about displaying the full date, i.e. 2 March 2011?
<?php the_time(‘F j, Y’); ?>
or
<?php the_date(‘F j, Y’); ?>
and if you want to change order, just switch F with j
F=month
adding it before the title just makes all the other text and formatting unaligned. does anyone have a simpler/clearer solution, i.e. non-techy?
Please paste the full php page of how you changed it at http://wordpress.pastebin.com/
Select PHP syntax highlighting so we can easily read the code
solution is perfect; implement has a tiny errorrrrr
Here’s the link…
http://wordpress.pastebin.com/zR6Ptydv
Where should I insert the code?
on line 11 of course, just give it a span class or something to style it.
look at my code:
<ul id="single_noticias">
<li><?php the_post_thumbnail('noticias-thumb');?></li>
<li><span class="red"><?php the_time('m/j/y') ?></span></li>
<li><h3><a>" ><span class="red"><?php the_title(); ?></span></a></h3></li>
<li><p><?php echo get_the_excerpt(); ?></p></li>
<li><span id="read_more"><?php echo twentyten_continue_reading_link(); ?></span></li>
<li id="social-noticias">
[Please post code snippets between backticks or use the code button.]
in case you haven’t noticed, i don’t have that much experience with wordpress, which is why advice like ‘just give it a span class or something to style it’ means pretty much zilch. can anyone else explain this in a way that even someone who doesn’t breathe code can figure out?
come on man, this is not kindergarten. don’t take it so personally;
try adding the time code on line 11. then add to your css -> div.date {display:inline;}
put your time code between a <span> </span>
this MIGHT work, I THINK. I am learning now also.
use firebug and test yourself styling, this is the was you will learn something.
question: why do you have this here? the_category(‘, ‘);
instead of the_category(); ??
let me know how is it going, maybe I can help.
cheers
@timduncan
question: why do you have this here? the_category(‘, ‘);
instead of the_category(); ??
i suppose, to get a comma separated list of the post’s category links.
http://codex.wordpress.org/Function_Reference/the_category
didn’t work but don’t worry about it. not really worth the trouble.