WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP Tag Cloud Fails Validation (3 posts)

  1. guyadams
    Member
    Posted 6 years 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') ) : ?>
    <li>
    <h2>Popular Tags</h2>
    <ul>
    <?php wp_tag_cloud('smallest=8&largest=22'); ?>
    </ul>
    </li>
    <?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.

    …yle='font-size: 8pt;'>YouTube

    Exact picture here

    Is this something I am doing or a bug in the tag cloud?

    Many thanks

  2. guyadams
    Member
    Posted 6 years ago #

    I figured this out, it was down to me not really knowing enough about PHP.

    Thanks

  3. archshrk
    Member
    Posted 6 years 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.

Topic Closed

This topic has been closed to new replies.

About this Topic