Title: Nested List Problem
Last modified: August 19, 2016

---

# Nested List Problem

 *  [ptvguy](https://wordpress.org/support/users/ptvguy/)
 * (@ptvguy)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/nested-list-problem/)
 * Anyone else having a problem with nested lists? I’m using WP 2.6.2 with the visual
   editor turned off. I want to create a post using a nested list along the lines
   of the following code:
 *     ```
       <ul>
       <li>
       x
       </li>
       <li>
       y
       <ul>
       <li>
       z
       </li>
       </ul>
       </li>
       </ul>
       ```
   
 * Unfortunately, when I save my post, WP adds a closing paragraph tag to the code
   like this:
 *     ```
       <ul>
       <li>
       x
       </li>
       <li>
       y</p>
       <ul>
       <li>
       z
       </li>
       </ul>
       </li>
       </ul>
       ```
   
 * Is there a fix for that?

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

 *  Thread Starter [ptvguy](https://wordpress.org/support/users/ptvguy/)
 * (@ptvguy)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/nested-list-problem/#post-871188)
 * Oops, I forgot to mention that I have the “WordPress should correct invalidly
   nested XHTML automatically” option unchecked.
 *  [EMG](https://wordpress.org/support/users/emg/)
 * (@emg)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/nested-list-problem/#post-871683)
 * This is an eight month old topic, but I’m going to revive it because even now
   with 2.8, the nested lists problem that won’t validate still perpetuates, especially
   if you have multiple paragraphs of text in your list.
 * Thankfully, this only happened in a page post and so I just implemented my correctly
   nested list without additional incorrect tags into a template and used the template
   for my page post instead of writing an actual post and then used CSS to display:
   none the post that’s nonexistent.
 * … What a convoluted workaround.
 *  Thread Starter [ptvguy](https://wordpress.org/support/users/ptvguy/)
 * (@ptvguy)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/nested-list-problem/#post-871685)
 * I don’t have that problem anymore since 2.7.1. No sign of it in 2.8 either, but
   I have “WordPress should correct invalidly nested XHTML automatically” turned
   off now.
 *  [ArcherTC](https://wordpress.org/support/users/archertc/)
 * (@archertc)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/nested-list-problem/#post-871692)
 * I thought I was going crazy: checked and rechecked my code, fed it through Dreamweaver
   CS3, and then gave up to go searching for reports of a problem. Here to report
   that this problem still exists for 2.8.4, at least for nesting an unordered list
   within an ordered one.
 *  [ArcherTC](https://wordpress.org/support/users/archertc/)
 * (@archertc)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/nested-list-problem/#post-871693)
 * I should note: this looks fine in the “visual” view of the page, but is messed
   up on the published page. Possible clues to a fix would be very welcome!
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/nested-list-problem/#post-871694)
 * I can’t replicate that problem on 2.8.4…
 * If you’re using HTML in the post, paste it in under the HTML tab.
 * Maybe you have other invalid markup in the page that WordPress is trying to account
   for..

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

The topic ‘Nested List Problem’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [list](https://wordpress.org/support/topic-tag/list/)
 * [nested list](https://wordpress.org/support/topic-tag/nested-list/)
 * [tags](https://wordpress.org/support/topic-tag/tags/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 4 participants
 * Last reply from: [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/nested-list-problem/#post-871694)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
