Saving the_time to a variable
-
Hello all, first few days working with WP and I have to say I’m impressed. Such a simple templating system, I love it.
I am having one issue right now. I would like to save the year a post was created to a variable that i can loop through the string and perform some manipulations.
the_time seems to have the echo built in, so I’m wondering if there is a function built in I can use that will do something like this:
$year = the_time('Y');Seems simple enough, thanks in advance!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Saving the_time to a variable’ is closed to new replies.