Display Post Date, but not as a link… ??
-
I’m using the following code to pull in my 2 most recent posts, and I’d like the date to be included on the line that the_title is on.. <?php the_date();> works, but it makes the date a link, which looks awful. How would I pull in the date from the article on that same line, but just have it as standard formatted text?
<?php $args = array( 'numberposts' => 2, 'category' => 7,); $lastposts = get_posts( $args ); foreach($lastposts as $post) : setup_postdata($post); ?> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?> <?php the_date(); ?></a></h2> <?php the_excerpt();?> <?php endforeach; ?> </div>
Thanks in advance for your help!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Display Post Date, but not as a link… ??’ is closed to new replies.