WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Non-Valid XHTML - How Do I Resolve? (5 posts)

  1. kennethwatt
    Member
    Posted 5 years ago #

    I have this code in my header.php file:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    
    <head profile="http://gmpg.org/xfn/11">
    <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" />
    <![endif]-->
    
    <?php wp_head(); ?>
    </head>
    
    <body>
    	<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>
    				</div>
    				<?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>
    				<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>
    			</div>
    		</div>
    	<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="http://www.technofinger.com/?cat=
    for each of the four categories...
    How do I resolve this?
    Many thanks :-)

  2. Samuel B
    moderator
    Posted 5 years ago #

    visit this link and click on the line number beside each error

  3. kennethwatt
    Member
    Posted 5 years ago #

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

    Thanks,

    Kenneth

  4. t31os
    Member
    Posted 5 years ago #

    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...

  5. kennethwatt
    Member
    Posted 5 years ago #

    Thanks mate that's great.

    :-)

Topic Closed

This topic has been closed to new replies.

About this Topic