WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] What is the location of these last errors? (9 posts)

  1. Will Taft
    Member
    Posted 7 years ago #

    I got my validation errors down from over 30 to these last two. They are both described as:

    * document type does not allow element "li" here; missing one of "ul", "ol" start-tag *

    I understand the above description and have fixed several like this in my themes php files already.

    The problem I have with these last two is finding the actual location of the code to be fixed. Below are both of the described locations. They are not in the themes php files. I also looked at the referenced "wp-login.php" in the first one and did not see the error. The second one, I don't have a clue where to look.

    <li><ahref="http://willtaft.com/wordpress/wp-login.php ?action=registe
    </li>
    <li><a href='http://willtaft.com/wordpress/2007/04/' title='April 2
    Thanks.</li>
  2. jabecker
    Member
    Posted 7 years ago #

    The register link is enclosed in <li></li> tags, but there is no outer <ul></ul> tags. Try either enclosing it in the ul tags or move it up so it's inside the previous pair.

    The second one is your archives link. It's wrapped by <li></li> tags that are inside <li></li> tags. li tags must be inside either ul or ol tags. They can't be inside another set of li tags.

  3. Will Taft
    Member
    Posted 7 years ago #

    Hi, and thanks for the explanation. I may have to leave these two errors if I just can't get it yet.

    Because the theme's author had lots of this kind of error and I fixed the rest of them, I know the problem and how to fix it except.... In these last two errors, I just can not find the actual location of the code.

    For example, I figured out the code in my post above is not in any of the theme's php files. I then saw that it may indicate that the code would be in the wp-login.php file, and I can find it there, but without the offending li tags the page source shows it wrapped with. Where do the li tags get inserted from in the page source if they are no in the wp-login file?

    I have the same issue, (finding the "li" to fix), with the other error.

  4. rudolf45
    Member
    Posted 7 years ago #

    You don't really have to worry where the li is coming from :)
    All you need to do - put some <ul></ul> around the code that is going to spit out the li tags and you should be OK.

    e.g.

    <ul>
    <?php wp_register(); ?>
    </ul>
  5. Will Taft
    Member
    Posted 7 years ago #

    Thank you! I had tried that but it then told me I was missing the li tags it had complained about earlier. Wacky, where did they go if I did not take them out, only added the ul tags?

    Anyway, I did it again and the validator showed that the "li's" were indeed gone again. So this time I took it's word for it and added the li tags back in, leaving the ul tags I just inserted and the page validates.

    This stuff can really confound someone just learning.

    Thanks for your help!

  6. rudolf45
    Member
    Posted 7 years ago #

    Hmmm. Then somebody should update the Codex:

    Default Usage

    wp_register displays the link in list format
    <li>.
    <?php wp_register(); ?>

  7. Will Taft
    Member
    Posted 7 years ago #

    I find answers to most of my questions in the Codex. I think it is very well done and helpful. Sometimes, though, I can't formulate search terms that turn up the Codex help I am looking for. Probably just my problem, though.

    For example, even after reading your last reply that what I was trying to figure out was in the Codex, I still could not find it. Oh well, once again, thanks to this forum, I understand a little bit more!

  8. rudolf45
    Member
    Posted 7 years ago #

    Supposedly all the template Tags are listed here: http://codex.wordpress.org/Template_Tags

  9. Will Taft
    Member
    Posted 7 years ago #

    Yes, there it is. But no search I do of the Codex turns it up. In addition to the previous searches I did, even the following don't turn up that page or the page linked from there that actually provides the answer.

    "wp_register displays the link in list format"

    wp_register

    "displays the link in list format"

    Is searching the Codex only searching topics or titles or is it full text searching?

    I do now see a link at the bottom of one of the search results that says "Go To Template Tags Index", but it was not obvious to me that is what I needed. I am not sure I would have even thought that was where I would find a link to the answer.

    Anyway, thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags