• matwolf

    (@matwolf)


    https://validator.w3.org/check?uri=http%3A%2F%2Fmatwolf.com%2F%3Fpage_id%3D2

    I went in to edit the code so my ‘pages’ are all left aligned and now I get an error when validating.

    It’s the “pages” part that’s screwed up. Here is the code:

    <li id="pages"><?php wp_list_pages('title_li=<h2>Pages</h2>'); ?>
    
    </li>
    
    	<?php get_links_list(); ?> 
    
    <li id="categories"><span class="sidetitle" ><?php _e('Categories'); ?></span>
    
    	<ul>
    
    	<?php wp_list_cats(); ?>
    
    	</ul>
    
     </li>

    Thanks!

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

    (@whooami)

    it tells you what you need.

    you need to wrap your list items, either in unordered list tags <ul></ul>, OR ordered list tags <ol></ol>

    Thread Starter matwolf

    (@matwolf)

    hi whooami, thanks.

    so it should look like this?

    <ul>
    <li id="pages"><?php wp_list_pages('title_li=<h2>Pages</h2>'); ?>
    
    </li>
    </ul>

    whooami

    (@whooami)

    <ul><li id="pages"><?php wp_list_pages('title_li=<h2>Pages</h2>'); ?>
    </li></ul>

    that should do it. and if you compare what I just did to what you have and what the validator outputs you might see that its not that tough to figure out — just have to put on your thinking cap.

    whooami

    (@whooami)

    yes ?? see, you put on your thinking cap ??

    Thread Starter matwolf

    (@matwolf)

    thanks again. i will try this a little later.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Anyone who knows how to fix this XHTML validation?’ is closed to new replies.