{"id":463,"date":"2006-04-12T23:49:26","date_gmt":"2006-04-13T07:49:26","guid":{"rendered":"http:\/\/www.krunk4ever.com\/blog\/?p=463"},"modified":"2006-04-17T19:24:36","modified_gmt":"2006-04-18T03:24:36","slug":"nested-lists-and-nested-blockquotes","status":"publish","type":"post","link":"https:\/\/www.krunk4ever.com\/blog\/2006\/04\/12\/nested-lists-and-nested-blockquotes\/","title":{"rendered":"Nested Lists and Nested Blockquotes"},"content":{"rendered":"<p>I hit some issues with my previous entry where I wanted to have nested lists and nested blockquotes. However, WordPress&#8217; automatic XHTML correction broke it every time.<\/p>\n<p>So I went searching for ways to get around this. Apparently you can disable the automatic XHTML correct by going to <strong>Options &gt; Writing &gt;<\/strong> and uncheck the <u>WordPress should correct invalidly nested XHTML automatically<\/u> option.<\/p>\n<p>After disabling that I was able to manually insert tags where before it wouldn&#8217;t let me. So first&#8230;<\/p>\n<p><strong>Nested Lists<\/strong>:<\/p>\n<p>Turns out that what I was doing was incorrect and W3 Validator threw an error, even though my lists showed up correctly. I then found this site: <a href=\"http:\/\/www.w3schools.com\/xhtml\/xhtml_html.asp\">XHTML vs HTML<\/a>: <em>A common mistake in nested lists, is to forget that the inside list must be within a li element.<\/em><\/p>\n<p><strong>Incorrect<\/strong>:<br \/>\n<code>&lt;ul&gt;<br \/>\n&nbsp;&nbsp;&lt;li&gt;level 1&lt;\/li&gt;<br \/>\n&nbsp;&nbsp;&lt;ul&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;level 2&lt;\/li&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;level 2&lt;\/li&gt;<br \/>\n&nbsp;&nbsp;&lt;\/ul&gt;<br \/>\n&lt;\/ul&gt;<\/code><\/p>\n<p><strong>Correct<\/strong>:<br \/>\n<code>&lt;ul&gt;<br \/>\n&nbsp;&nbsp;&lt;li&gt;level 1<br \/>\n&nbsp;&nbsp;&lt;ul&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;level 2&lt;\/li&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;level 2&lt;\/li&gt;<br \/>\n&nbsp;&nbsp;&lt;\/ul&gt;&lt;\/li&gt;<br \/>\n&lt;\/ul&gt;<\/code><\/p>\n<p>The above code would generate this:<\/p>\n<ul>\n<li>level 1\n<ul>\n<li>level 2<\/li>\n<li>level 2<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Turns out the XHTML auto correction will accept the above correct model.<\/p>\n<p><strong>Nested Blockquotes<\/strong>:<\/p>\n<p>The next thing was the nested blockquotes that kept getting &#8220;fixed&#8221;. W3 Validator wasn&#8217;t throwing any fit with the nested blockquotes. I searched to see if there&#8217;s a problem with WordPress and it turns out <a href=\"http:\/\/trac.wordpress.org\/ticket\/1170\">there is a bug<\/a>. Not sure if it&#8217;ll be fix, but for now, the only way to have nested blockquotes is to disable the auto correction (instructions above).<\/p>\n<p><strong>Code<\/strong>:<br \/>\n<code>&lt;blockquote&gt;level 1<br \/>\n&lt;blockquote&gt;level 2&lt;\/blockquote&gt;<br \/>\nlevel 1&lt;\/blockquote&gt;<\/code><\/p>\n<p><strong>Generated Output<\/strong>:<\/p>\n<blockquote><p>level 1<\/p>\n<blockquote><p>level 2<\/p><\/blockquote>\n<p>level 1<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I hit some issues with my previous entry where I wanted to have nested lists and nested blockquotes. However, WordPress&#8217; automatic XHTML correction broke it every time. So I went searching for ways to get around this. Apparently you can disable the automatic XHTML correct by going to Options &gt; Writing &gt; and uncheck the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.krunk4ever.com\/blog\/2006\/04\/12\/nested-lists-and-nested-blockquotes\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Nested Lists and Nested Blockquotes&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/posts\/463"}],"collection":[{"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/comments?post=463"}],"version-history":[{"count":0,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/posts\/463\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/media?parent=463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/categories?post=463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/tags?post=463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}