XHTML validating & the <!–more–> tag
On my site I have a lot of posts that are a couple of lines introduction followed by a lengthy blockquote.
I want to have the
<!--more-->tag a couple of paragraps into the blockquotes.
However if I do this it does not validate as XHTML because the blockquote does not get closed (& depending on the theme used the page can end up looking a complete mess as a result.)
After a bit of fiddling about, I thought that I could solve the problem by adding a custom field called brokenquote to denote posts where the blockquote needed closing after the
However, it works to an extent, but all the tags around this point in the post are still nested incorrectly stopping it validating. Whatever I do the
<a>for the continuation text always starts before any of my modified code.
An example should make it slightly clearer what I mean:
<?php $brokenquote = get_post_custom_values("brokenquote");
if(count($brokenquote) > 0) the_content('Read the rest of this entry ï¿½</blockquote>
else the_content('Read the rest of this entry ï¿½'); ?>
Produces output where the tags are nested like this:
Read the rest of this entry ï¿½
Where you can see that the blockquote & a & p tags are all half overlapping one another.
Any suggestions of the best way to approach this problem would be welcomed.
- The topic ‘XHTML validating & the <!–more–> tag’ is closed to new replies.