Viewing 15 replies - 1 through 15 (of 15 total)
  • <?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’) ?>

    Thread Starter eugeneyiga

    (@eugeneyiga)

    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

    Thread Starter eugeneyiga

    (@eugeneyiga)

    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?

    Alwyn Botha

    (@123milliseconds)

    Please paste the full php page of how you changed it at https://wordpress.pastebin.com/

    Select PHP syntax highlighting so we can easily read the code

    solution is perfect; implement has a tiny errorrrrr

    Thread Starter eugeneyiga

    (@eugeneyiga)

    Here’s the link…

    https://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.]

    Thread Starter eugeneyiga

    (@eugeneyiga)

    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.

    https://codex.www.ads-software.com/Function_Reference/the_category

    true, true. thank you

    Thread Starter eugeneyiga

    (@eugeneyiga)

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

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘my blog posts don't show the date…’ is closed to new replies.