Title: Need Help with Code Validation
Last modified: August 18, 2016

---

# Need Help with Code Validation

 *  [nmallory](https://wordpress.org/support/users/nmallory/)
 * (@nmallory)
 * [21 years ago](https://wordpress.org/support/topic/need-help-with-code-validation/)
 * O.K. Thanks to a nice person who adviced me to check out my code through a validation
   site (actually she nicely provided the link), I have fixed most of the invalid
   code. However, there are 10 left which perplex me. The messages all appear to
   indicate that my ordered and unordered lists are “in the wrong places” and also
   the divs for the excerpt reloaded plug-in.
 * The validation is [here](http://validator.w3.org/check?uri=http%3A%2F%2Ftheweekendchef.exit-23.net%2F&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&verbose=1)
 * The website is [The Weekend Chef](http://theweekendchef.exit-23.net).

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [21 years ago](https://wordpress.org/support/topic/need-help-with-code-validation/#post-212510)
 * Did you try to check the box “Show Source” on the validation page and hit the
   Revalidate button? It will show you exactly where the mistakes/errors are.
 *  [techwench](https://wordpress.org/support/users/techwench/)
 * (@techwench)
 * [21 years ago](https://wordpress.org/support/topic/need-help-with-code-validation/#post-212515)
 * Your`<ul><li>` are _inside_ the `<p>` tags. That’s what it’s complaining about.
   They have to be _outside_ the `<p>` tags.
 *  Thread Starter [nmallory](https://wordpress.org/support/users/nmallory/)
 * (@nmallory)
 * [21 years ago](https://wordpress.org/support/topic/need-help-with-code-validation/#post-212518)
 * OK How do I get them out of the ` <p>` tags? WordPress appears to be adding them
   it by it’s lonesome. These ordered and unordered lists are in posts I wrote.
 *  Thread Starter [nmallory](https://wordpress.org/support/users/nmallory/)
 * (@nmallory)
 * [21 years ago](https://wordpress.org/support/topic/need-help-with-code-validation/#post-212537)
 * Hmmm…I replied to this but it seems to have disappeared.
 * I managed to get the lists sorted out. It had to do with the Textile 1.0 plug-
   in and I had to deactivate it and then edit all the posts I’d written since I
   turned it on.
 * The issue with the `<div>` remains and appears to be the result of the_excerpt_reloaded
   which apparently is “fixing” the unclosed tags **after** the `<div>` instead 
   of before it and therefore it makes the page XHTML invalid. 🙁 Anyone know how
   to resolve this?
 * TIA!
 *  [techwench](https://wordpress.org/support/users/techwench/)
 * (@techwench)
 * [21 years ago](https://wordpress.org/support/topic/need-help-with-code-validation/#post-212543)
 * I wonder if it’s the excerpt plugin or WP itself?
 * Check in Admin >> Options >> Writing
 * And see if the “WordPress should correct invalidly nested XHTML automatically”
   box is checked. If it is, uncheck it.
 *  [crowspeaker](https://wordpress.org/support/users/crowspeaker/)
 * (@crowspeaker)
 * [21 years ago](https://wordpress.org/support/topic/need-help-with-code-validation/#post-212544)
 * In your template source, you need to move the `</p>` tag before the div the styles
   your “more”. You’re not supposed to put div between p tags.
 * So this
 * `<p><em>Suggested Variation</em><br />
    For something a little more soupy, add
   another cup or two<br /> <div class="more-link"> <a href="http://theweekendchef.
   exit-23.net/20050529/mushroom-wild-rice-mush/#more-97"> (more…)</a></div> </p
   > </div>
 * should look like this:
 * `<p><em>Suggested Variation</em><br />
    For something a little more soupy, add
   another cup or two<br /> </p> <div class="more-link"> <a href="http://theweekendchef.
   exit-23.net/20050529/mushroom-wild-rice-mush/#more-97"> (more…)</a></div> </div
   >
 *  Thread Starter [nmallory](https://wordpress.org/support/users/nmallory/)
 * (@nmallory)
 * [21 years ago](https://wordpress.org/support/topic/need-help-with-code-validation/#post-212548)
 * Crowspeaker – I realize that. However, it’s the_excerpt_reloaded() plugging which
   is not writting the closing out tags before the div that is causing the problem.
 * techwench – I tried unclicking that option and got 23 errors instead of 5.
 * I also tried moving the code in the plug in that does the balanceTags() to before
   it adds the “more” link but that resulted in no closing tags being written and
   23 errors as well.
 *  Thread Starter [nmallory](https://wordpress.org/support/users/nmallory/)
 * (@nmallory)
 * [21 years ago](https://wordpress.org/support/topic/need-help-with-code-validation/#post-212555)
 * In case anyone wants to know how to fix this in the future:
 * Open the-excerpt-reloaded.php file in your plugins directory and find this line:
   `
   $excerpt .= "<div class=\"more-link\"> <a href=\"". get_permalink() . "#more-
   $id\">$more_link_text</a></div>";`
 * and change it to:
    `\`$excerpt .= "<span class=\"more-link\"> $more_link_text`
   </span>";'
 * The drawback is that it doesn’t put the more link text on a new line, but you
   might be able to add a 
    before the <span> to resolve that if you need to.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Need Help with Code Validation’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 4 participants
 * Last reply from: [nmallory](https://wordpress.org/support/users/nmallory/)
 * Last activity: [21 years ago](https://wordpress.org/support/topic/need-help-with-code-validation/#post-212555)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
