Title: WordPress should correct invalidly nested XHTML automatically
Last modified: October 28, 2017

---

# WordPress should correct invalidly nested XHTML automatically

 *  Resolved [dardargraphic](https://wordpress.org/support/users/dardargraphic/)
 * (@dardargraphic)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/wordpress-should-correct-invalidly-nested-xhtml-automatically-2/)
 * Hello,
    I am trying to add a short of js&html code to of page my website. The
   code easily worked on another html static my website but I can not run it on 
   WordPress. I’ve tried adding the code to a text box but the code disappears.
 * Why doesn’t appearing Settings > Writing: “WordPress should correct invalidly
   nested XHTML automatically” in my theme? However, interestingly this part is 
   not seening(not included, how does this happen?) in the my theme.
    Best.
    -  This topic was modified 8 years, 7 months ago by [dardargraphic](https://wordpress.org/support/users/dardargraphic/).
    -  This topic was modified 8 years, 7 months ago by [dardargraphic](https://wordpress.org/support/users/dardargraphic/).

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

 *  Thread Starter [dardargraphic](https://wordpress.org/support/users/dardargraphic/)
 * (@dardargraphic)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/wordpress-should-correct-invalidly-nested-xhtml-automatically-2/#post-9629773)
 * [Settings > Writing](http://www.imgim.com/settings-writing.png)
    -  This reply was modified 8 years, 7 months ago by [dardargraphic](https://wordpress.org/support/users/dardargraphic/).
    -  This reply was modified 8 years, 7 months ago by [dardargraphic](https://wordpress.org/support/users/dardargraphic/).
 *  [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/wordpress-should-correct-invalidly-nested-xhtml-automatically-2/#post-9629909)
 * The setting hasn’t existed for new installs for 2 years. If you want to use this
   functionality you need to add it manually with the following code.
 *     ```
       add_filter( 'content_save_pre', 'force_balance_tags', 50 );
       ```
   
 * Add it to a [Child Theme](https://codex.wordpress.org/Child_Themes) or a [custom plugin](http://justintadlock.com/archives/2011/02/02/creating-a-custom-functions-plugin-for-end-users).
 *  Thread Starter [dardargraphic](https://wordpress.org/support/users/dardargraphic/)
 * (@dardargraphic)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/wordpress-should-correct-invalidly-nested-xhtml-automatically-2/#post-9633866)
 * Hello Jacop,
    I thank you for taking time out to answer my question. I will tried.
   Thank you very much for your helpfulness and courtesy. Best.
 *  [game writer](https://wordpress.org/support/users/scrybbler/)
 * (@scrybbler)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/wordpress-should-correct-invalidly-nested-xhtml-automatically-2/#post-9819205)
 * [@jakept](https://wordpress.org/support/users/jakept/) thanks man! where exactly
   should I put this code? into a child version of plugin.php?

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

The topic ‘WordPress should correct invalidly nested XHTML automatically’ is closed
to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [game writer](https://wordpress.org/support/users/scrybbler/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/wordpress-should-correct-invalidly-nested-xhtml-automatically-2/#post-9819205)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
