WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this line of code :

$registration_date = get_the_time('F j, Y').' at '.get_the_time('g:i a');

I just ran this on my BlueHost hosted website and it returned : January 29, 2013 at 12:54 pm

However, on the same site I can see in the dashboard that post publication dates are correct.

share|improve this question
Can you describe the problem more clearly... – Vinod Dalvi Apr 11 '13 at 12:00
Yes. The problem is that today is not 29th of January :) the get_the_time('F j, Y') call should return today's date. – drake035 Apr 11 '13 at 12:08
up vote 4 down vote accepted

get_the_time() function returns the time of the current post within loop.

If you want to display today's date then use date function of core php.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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