The strangest WP problem!
-
Hello all,
I just undertook a legacy (table-based) site to update it in WP 2.8 and create the WP theme. Everything went according to plan, but I encounter the strangest WP problem ever!
If you have a look at header.php file, I put all the styles/scripts into the <head> area. Also if you view the source code from the browser (view source), everything looks fine.
The problem is that, technically all my styles and scripts are located at the top of the body, and not in the <head> section! If you inspect the code with Firebug, you will see it with your own eyes!!! Do you have any idea what’s going wrong? Please have a look at the below code and let me know your thoughts… Is it a WP bug?
Header.php file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" /><title><?php if (is_home()) { bloginfo('name');
} elseif (is_category() || is_page() ||is_single() || is_category() || is_tag() || is_date() || is_author() || is_archive() || is_search() ) {
bloginfo('name'); echo ' - ';
}
wp_title('');
?></title><link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<script src="<?php bloginfo('template_directory'); ?>/scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/scripts/jquery.tools.min.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/scripts/AC_RunActiveContent.js" type="text/javascript"></script><!--we need this for plugins-->
<?php wp_head(); ?></head>
<body><table width="970" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="7" nowrap="nowrap" bgcolor="#FFFFFF"><img src="<?php bloginfo('template_directory'); ?>/images/index_01.jpg" width="307" height="175" /></td>
</tr>
<tr>
<td colspan="7">
<ul id="menu">
<?php wp_list_pages('sort_column=menu_order&title_li='); ?></td>
</tr>
<tr>
<td colspan="7">test</td>
</tr>
<tr>
<td colspan="7"><img src="<?php bloginfo('template_directory'); ?>/images/index_05.jpg" width="970" height="25" /></td>
</tr>
<!--header.php end-->I’m also including the index.php file for reference.
Index.php
<?php get_header(); ?>
<tr>
<td height="135" colspan="7" bgcolor="#FFFFFF"><?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>"><h2><?php the_title(); ?></h2>
<div class="entry">
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?><?php wp_link_pages(array('before' => '<p>Pages: ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div></div>
<?php endwhile; endif; ?>
</div>
</td>
</tr>
<!--index.php end--><?php include (TEMPLATEPATH . "/main_extra_gr.php"); ?>
<!--include footer-->
<?php get_footer(); ?>Thanks in advance,
Yiannis
- The topic ‘The strangest WP problem!’ is closed to new replies.