WordPress.org

Ready to get started?Download WordPress

Forums

my blog posts don't show the date... (16 posts)

  1. eugeneyiga
    Member
    Posted 3 years ago #

    Hi,

    I just launched my blog but the first post doesn't show the publish date. Could someone please help?

    Thanks,
    Eugene

    http://www.eugeneyiga.com

  2. timduncan
    Member
    Posted 3 years ago #

    <?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.

  3. timduncan
    Member
    Posted 3 years ago #

    or this:

    <?php the_time('d.m.y') ?>

  4. eugeneyiga
    Member
    Posted 3 years ago #

    what about displaying the full date, i.e. 2 March 2011?

  5. timduncan
    Member
    Posted 3 years ago #

    <?php the_time('F j, Y'); ?>

    or

    <?php the_date('F j, Y'); ?>

  6. timduncan
    Member
    Posted 3 years ago #

    and if you want to change order, just switch F with j
    F=month

  7. eugeneyiga
    Member
    Posted 3 years ago #

    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?

  8. 123milliseconds
    Member
    Posted 3 years ago #

    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

  9. eugeneyiga
    Member
    Posted 3 years ago #

    Here's the link...

    http://wordpress.pastebin.com/zR6Ptydv

    Where should I insert the code?

  10. timduncan
    Member
    Posted 3 years ago #

    on line 11 of course, just give it a span class or something to style it.

  11. timduncan
    Member
    Posted 3 years ago #

    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.]

  12. eugeneyiga
    Member
    Posted 3 years ago #

    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?

  13. timduncan
    Member
    Posted 3 years ago #

    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

  14. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    @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

  15. timduncan
    Member
    Posted 3 years ago #

    true, true. thank you

  16. eugeneyiga
    Member
    Posted 3 years ago #

    didn't work but don't worry about it. not really worth the trouble.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.