• Resolved Corse

    (@corse)


    Hello,

    I want to add the current date in my right navbar. I know how to use the echo date function. But i only can use the the_time function, becouse it need to be into dutch date format.

    When i place <?php the_time(‘j F Y’); ?> it only shows the last post date.

    What do it need to do to make in show the current date?

    Please help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    <?php echo date('j F Y'); ?>

    Thread Starter Corse

    (@corse)

    The <?php echo date(‘j F Y’); ?> function shows the date in English format. The the_time function shows it on my website in Dutch. So i need to use the the_time function. But how to make it show the current date.

    https://www.alfablog.nl

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    OH! Okay. Missed that bit.

    <?php echo date_i18n('j F Y', time()); ?>

    Thread Starter Corse

    (@corse)

    Yes it works..

    Thank you!

    I want to show my current date in Malay, what function should i use?

    once i add the code, how do i move it / style it to where i need it to be? and i need the letters white instead of black.
    thank you

    I want to show my current date in Malay, what function should i use?

    the same one
    <?php echo date_i18n('j F Y', time()); ?>
    it displays date in your wp’s language

    how do i move it / style it to where i need it to be?

    you should use somethimg like this:
    <span class="current-date"><?php echo date_i18n('j F Y', time()); ?></span>
    now you can play with your style.css. just add the following lines:

    .current-date {
          color: #fff;
    }

    it should work.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Show current date’ is closed to new replies.