-2

i would like to display a date on my Blog. I have used this Code for displaying the date:

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

But that uses the time of the latest article. How can i display the current date?

  • 1
    not a wordpress problem - see php function date() php.net/manual/en/function.date.php – Michael Dec 29 '11 at 11:57
  • If this is a crosspost with the same question on serverfault, reference any help from there. And if this isn't for WordPress, is belongs on serverfault or stackoverfow. – markratledge Dec 29 '11 at 19:21
1

Just use the PHP date() function as Michael suggested. So your date code might look like this:

<?php echo date('l, j. F Y'); ?>
  • Yes but that Doesn't work properly. I need an german date. So i gotta have to use the setlocale () and strftime () functions. And that works not for me. See my question on ServerFault: serverfault.com/questions/345024/… – hazelnut Dec 29 '11 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.