The_time Value?
-
Hello there,
I was trying to get my index page to display the date and then show all posts for that day under it. So it might look like this:
January 17
Post 1
Post 1 Text here
Post 2
Post 2 Text hereJanuary 16
ect.I thought this would be an easy way to do it. In my template header page I put in this code:
<?
$newtime = the_time(‘F jS, Y’);
if ($newtime !== $lastname){
?>
<div class=”post”>
<?php
echo(“$newtime”);
$lastname = $newtime;
?>
</div>
<?}?>But all it does is print out the date doesn’t even put it in the post divs. So I think this line “$newtime = the_time(‘F jS, Y’);” is just printing out the date.
Is there any way to accomplish what I’m after? I guess I would just need the value of the_time function, unless someone had a better way. Thanks!
- The topic ‘The_time Value?’ is closed to new replies.