Forums

lists (4 posts)

  1. commercialexpress
    Member
    Posted 11 months ago #

    Currently validating my code on my these but keep getting this error:

    Line 331, Column 52: Element li not allowed as child of element div in this context. (Suppressing further errors from this subtree.)
    <li id="php_widget-15" class="widget php_widget">
    Contexts in which element li may be used:
    Inside ol elements.
    Inside ul elements.
    Inside menu elements.
    Content model for element div:
    Flow content.

    I dont understand how to resolve this but its saying it for each of my widget in the sidebar. How do i resolve this?

  2. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    You need to use properly formatted lists -- must be a <ul> or <ol> around <li> tags. You have li tags without the ul or ol ones in the widgets.

  3. alchymyth
    The Sweeper & Moderator
    Posted 11 months ago #

    if this is an error for each of the widgets, re-consider what to use in the register_sidebar() function in functions.php of your theme: http://codex.wordpress.org/Function_Reference/register_sidebar

    a <ul> or <ol> tag seems to be missing in front and the corresponding closing tag after each widget.

  4. commercialexpress
    Member
    Posted 10 months ago #

    Hi,

    I've been trying to locate the sidebar.php for my theme but i can't seem to locate it.

    Ive checked the source code of my site and then checked it with the wc3 validator's corrected code which shows where the
    <ul> tag is missing from mine but im not sure how to add this in.

    Please advice where and how I can add and close the <ul> tag or least be able to remove the <li> tags

    Thank you.

Reply

You must log in to post.

About this Topic