Date and Time on Posts
-
Hello, am trying to have date and time show up on each post. have went through a few forum topics but I’ve highlighted what I’m running into below….
<a href="<?php the_permalink(); ?>"><?php dp_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"'); ?></a> <a href="<?php the_permalink(); ?>" class="title"><?php the_title(); ?></a> <div class="datemeta"><?php the_date(); ?> at <?php the_time() ?></div> <p><?php echo dp_clean($post->post_content, 250); ?></p>
I added in the part that reads <div class=”datemeta”><?php the_date(); ?> at <?php the_time() ?></div>
However, this makes it so the first post on my front page shows the date and time, but all subsequent posts after just show the time. Does this code need to be put in any other php files so that every post on my site will show date and time. Even just the date would work for now, as by default nothing is showing up. (I am using a schemer mag theme on my site)
Also- even though the most recent post shows the date and time, when I actually click on the post to take to the actual post page, there is no date or time.
Thanks!
- The topic ‘Date and Time on Posts’ is closed to new replies.