Forums

Invalid markup in wp_list_bookmarks (2 posts)

  1. spstieng
    Member
    Posted 3 years ago #

    Is it just me, or does wp_list_bookmarks produce, by default, invalid markup?

    This is my code

    <div id="featured-sidebar">
    <?php
      /* Widgetized sidebar, if you have the plugin installed. */
    	 if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Featured Page Textwidgets') ) :
       endif;
    
      $categories = '6';
      $link_list_name = 'Fashion Weeks';
    
      wp_list_bookmarks('categorize=0&title_li='.$link_list_name.'&category='.$categories.'&class=');
    ?>
    </div>

    And this produced the following output

    <DIV id="featured-sidebar">
      <LI class="" id="linkcat-6">
      <H2>Fashion Weeks</H2>
        <UL>
          <LI>
            <A href="http://www.copenhagenfashionweek.com/">Copenhagen Fashionweek</A>
          </LI>
          <LI>
            <A href="http://www.cphvision.dk/" target="_blank">CPH Vision</A>
          </LI>
        </UL>
      </LI>
    </DIV>

    The original source is actually lower case XHTML, it's just the IE Doom Eplxorer that puts it in upper case for some reason...

    Anyway. The invalid markup is the

  2. tag just after the <div> tag.
    You cannot use
  3. without either an
      or
        . Please correct me if I'm wrong here.

        IS this a "bug" in the wp_list_bookmarks function?

  • spstieng
    Member
    Posted 3 years ago #

    right.... let's try that again, this time I'll put my HTML tasg INSIDE a code quote :)

    The invalid markup is the <li> tag just after the <div> tag.
    You cannot use <li> without either an <ol> or <ul>. Please correct me if I'm wrong here.
    
    Is this a "bug" in the wp_list_bookmarks function?
  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags