Viewing 3 replies - 1 through 3 (of 3 total)
  • the_time doesn’t work that way, but try sending in a the_date call with time specific formatting ..

    Thread Starter black-dog

    (@black-dog)

    I tried with the_date() first, but it only shows once if a day has more than one posts. The trick is to use get_the_time(). Sorry for not searching more carefully before posting.

    its unclear to me if you figured out your issue or not, but to use the_date like a variable you need to set one of the arguments to false so it won’t send it to the screen.. see here:
    http://codex.wordpress.org/Template_Tags/the_date

    I needed to do it once and used something like:
    <?php $current_date = the_date('', '', '', FALSE);?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pass the_time() to a variable?’ is closed to new replies.