• prjg

    (@iiiiiiiv)


    Howdy, site in question is in my name (not entirely SFW)

    For the life of me I cannot find where this errant li tag is being included from.

    It’s the code just before the “Pages” H2 in my sidebar. Something is throwing <li class="pagenav"> in there which causes it to fail validation (unnested tag).

    I can’t find it in my theme’s sidebar.php, page.php, index.php or the default theme’s similar pages.

    Where is this coming from?

Viewing 5 replies - 1 through 5 (of 5 total)
  • peiqinglong

    (@peiqinglong)

    You have to post up your sidebar code. I’m thinking there is a line in there somewhere, probably in the PHP code that has an li in it. I can’t view the PHP source of your site and without seeing the PHP, it would be extremely difficult to trouble shoot it.

    Thread Starter prjg

    (@iiiiiiiv)

    <?php if (is_home()) { ?>
    <?php if (function_exists('wp_theme_switcher')) { ?>
    <h2>Styleswitcher</h2>
    <?php wp_theme_switcher(); ?>
    <?php } ?>

    That is what’s before it and this is the line that loads the Pages menu. If I remove this line it get rid of the error, but it also gets rid of my page menu :/

    <?php wp_list_pages('sort_column=menu_order&title_li=<h2>' . __('Pages') . '</h2>' ); ?> `

    peiqinglong

    (@peiqinglong)

    I’m thinking maybe a plugin you have running that “accesses” the sidebar might be the culprit. Try deactivating your plugins to test…

    Kafkaesqui

    (@kafkaesqui)

    Try changing your wp_list_pages() to the following:

    <h2>Pages</h2>
    <ul>
    <?php wp_list_pages('sort_column=menu_order&title_li='); ?>
    </ul>

    That’ll remove the extra list tagging going on.

    Thread Starter prjg

    (@iiiiiiiv)

    Thank you Kafkaesqui, that fixed it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Annoying validation killer’ is closed to new replies.