Support » Fixing WordPress » WP Tag Cloud Fails Validation
9 years, 6 months ago
I recently added a tag cloud using the following code to the sidebar in the Paalm theme:
<?php if ( function_exists('wp_tag_cloud') ) : ?>
<?php wp_tag_cloud('smallest=8&largest=22'); ?>
<?php endif; ?>
After doing so my blog fails its XHTML transitional validation with the these errors:
Line 283, Column 124: document type does not allow element “a” here; assuming missing “li” start-tag.
…cs’ rel=”tag” style=’font-size: 8pt;’>3Dfx
Line 417, Column 143: end tag for “li” omitted, but OMITTAG NO was specified.
Exact picture here
Is this something I am doing or a bug in the tag cloud?
I figured this out, it was down to me not really knowing enough about PHP.
8 years, 9 months ago
So what was the problem?
I do the above and I get a column instead of the cloud. If I remove the
li and ul tags I get the cloud but not valid xhtml.