Title: Modifying this code?
Last modified: August 18, 2016

---

# Modifying this code?

 *  [xhan104](https://wordpress.org/support/users/xhan104/)
 * (@xhan104)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/modifying-this-code/)
 * 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!)
 * `
    <?php $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?

The topic ‘Modifying this code?’ is closed to new replies.

## Tags

 * [tags](https://wordpress.org/support/topic-tag/tags/)
 * [valid](https://wordpress.org/support/topic-tag/valid/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)
 * [xhtml](https://wordpress.org/support/topic-tag/xhtml/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [xhan104](https://wordpress.org/support/users/xhan104/)
 * Last activity: [19 years, 11 months ago](https://wordpress.org/support/topic/modifying-this-code/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
