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?
Oops, I forgot to mention that I have the “WordPress should correct invalidly nested XHTML automatically” option unchecked.
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.
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.
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.
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!
- The topic ‘Nested List Problem’ is closed to new replies.