Support » How-To and Troubleshooting » Modifying this code?
10 years, 4 months ago
I have this code on my website at the moment, the problem is I would like it to be XHTML valid!
I know that you can add ‘li’ etc into the () but I’m not that good! (yet!)
$posts = get_posts('numberposts=3&order=DESC&orderby=post_date');
foreach ($posts as $post) : start_wp(); ?>
<div class="sidetitle"><?php the_title(); ?></div>
<div class="sidedate"><?php the_date(); echo ""; ?></div>
<?php the_excerpt(); ?>
<?php endforeach; ?>
Could someone help me out with making it validate, its the only thing stopping my site from being valid.
I would also like to include a link to the post in say the title or the […] that comes after the excerpt. Any ideas on how that could be done?