Support » Theme: Frau » Add time&year in the entries

  • Hi!

    I’m totally new to WordPress, it’s great, love it so far 🙂

    I need some help. I jsut want to know how to add the date and time at the bottom of my entries or maybe in the tab that sticks out from each post, where the day is located. There is not time and year there.

    Can you help me and take a look at my site how to do?

    Thnx’
    http://xoxonicole.com

Viewing 9 replies - 1 through 9 (of 9 total)
  • Theme Author LizardThemes

    (@lizardthemes)

    Hi!
    Could you clarify your issue? As I can see there is the date of publication of the post on the top left of each post you have. Why do you need to specify the date at the bottom of your post again?

    I mean the time, not the date. I would want the time to show.

    Theme Author LizardThemes

    (@lizardthemes)

    To fix this you have to replace the code:
    <div class="post-date"><?php echo get_the_date('d'); ?><div class="post-day"><?php echo get_the_date('M');?></div></div>
    with:
    <div class="post-date"><?php echo get_the_date('d'); ?><div class="post-day"><?php echo get_the_date('M');?><div class="post-time"><?php the_time('g:i a');?></div></div></div>
    in the file content.php.
    Besides, you have to increase height for the element .post-date in the file style.css.

    Thanks alot, it helped so much!

    Just one more thing. I live in Sweden, so I want the time to be as “stockholm”, I looked on the web and it should be time zone CET, but i can’t get the hang of it, how to write it in the file.

    e(‘h:i, CET’);

    Gets wrong on the website.

    http://www.timeanddate.com/library/abbreviations/timezones/eu/

    I fixed it 🙂 Ty

    I would now like to add the year in my blog posts, it’s confusing when you only can read out the date..and not wich year the entry is written.

    I would like the year to be written under the date. Between the date and clock.

    Can someone help me out how to write in the codes?
    I guess in content.php again?
    But how should the code look like?

    My blog, to take a look:
    http://xoxonicole.com/

    I got a lot of help last time about the date.

    Theme Author LizardThemes

    (@lizardthemes)

    To add the year of posting you have to insert the code:
    echo (' '); echo get_the_date('Y');
    right after :
    `<?php echo get_the_date(‘M’);’
    on the 4th line of the file content.php as you have already guessed.

    It does not work, says eroor on that line.

    I try to make it like this, i haven’t done anything beside doing exactly as you said. So they code would then look like this when i copy and paste it here from my file:

    <div class=”post-date”><?php echo get_the_date(‘d’); ?><div class=”post-day”><?php echo get_the_date(‘M’);?echo (‘ ‘); echo get_the_date(‘Y’);>

    I think it’s the questionsmark that screws it up? Cause my line doesn’t look exactly as in your example.

    Without the pasted code you gave me, my line looks like this:

    <div class=”post-date”><?php echo get_the_date(‘d’); ?><div class=”post-day”><?php echo get_the_date(‘M’);?>

    Theme Author LizardThemes

    (@lizardthemes)

    Hi!
    Sorry for inconvenience. The line should look like:
    <div class="post-date"><?php echo get_the_date('d'); ?><div class="post-day"><?php echo get_the_date('M'); echo (' '); echo get_the_date('Y');?>

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Add time&year in the entries’ is closed to new replies.