Support » Themes and Templates » Non-Valid XHTML – How Do I Resolve?

  • Resolved kennethwatt


    I have this code in my header.php file:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    <html xmlns="" <?php language_attributes(); ?>>
    <head profile="">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <!--[if lt IE 7]>
    	<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/unitpngfix/unitpngfix.js"></script>
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/ie.css" type="text/css" media="screen" />
    <?php wp_head(); ?>
    	<div id="wrapper">
    		<div id="page">
    			<div id="header">
    				<div id="headerimg">
    					<h1><a href="<?php echo get_option('home'); ?>/" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
    				<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('TopAd') ) : ?><?php endif; ?>
    				<div id="rss" title="Subscibe To Our RSS Feed">
    					<a href="<?php bloginfo('rss2_url'); ?>">Subscribe Via RSS</a>
    				<div id="menu">
    				<?php wp_list_categories('orderby=ID&include=13,393,600,630&title_li'); ?>
    				<div id="searchetc">
    					<?php include (TEMPLATEPATH . '/searchformtop.php'); ?>
    	<div id="contentwrapper">

    And this part is causing the validator to go funny:
    <?php wp_list_categories('orderby=ID&include=13,393,600,630&title_li'); ?>
    It says this:
    <li class="cat-item cat-item-13"><a href="
    for each of the four categories…
    How do I resolve this?
    Many thanks 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • visit this link and click on the line number beside each error

    Yep – I have done so but I need to know which file to change!



    It’s not the header.php which is the problem…

    It’s the incorrectly commented code that’s causing a good bunch of those problems, find the commented code, fix that and a good chunk of those errors will vanish.

    <!--- & --->

    Should be…

    <!-- & -->

    Just before ..
    <h4>More Stories<a href="#more" class="plus"></a><a href="#less" class="minus"></a></h4>

    Is where it starts…

    Thanks mate that’s great.


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Non-Valid XHTML – How Do I Resolve?’ is closed to new replies.