I somehow managed to blow my WordPress Site up; The last file I was in was my header.php, I’ve been combing through it for a couple hours and haven’t found whats causing the break yet.
Any suggestions:
Header.php below:
<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?> >
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>"/>
<meta property="fb:admins" content="1641586359" />
<title>
<?php
if($pagePtr =="home"){
print"Read It Forward";
}else if( is_search() ){
echo the_search_query(); print" - Read It Forward Search Results";
}else{
wp_title('', true, 'left');
} ?>
<?php //bloginfo('name'); ?>
</title>
<meta name="description" content="Sneak peeks at great reads, behind-the-scenes insights from authors, lively & provocative reader's guides & fabulous free books." />
<link type="text/css" href="<?php bloginfo('template_directory'); ?>/style.css" rel="stylesheet" />
<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/images/rif_icon.gif" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php if (is_single()) { ?>
<meta property="og:title" content="<?php single_post_title(''); ?>" />
<meta property="og:description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>" />
<meta property="og:type" content="article" />
<meta property="og:image" content="<?php
if($image= get_post_meta($post->ID, "image", true)) { echo $image; }
else if($isbn= get_post_meta($post->ID, "isbn", true)) { ?>http://www.randomhouse.com/images/dyn/cover/?source=<?php echo $isbn; ?>&height=225&maxwidth=150<?php }
else { ?>
http://www.crownpublishing.com/images/readitforward/rif_square.jpg
<?php }?>" />
<?php } ?>
<link href="<?php bloginfo('template_directory'); ?>/tweet/tweet.css" media="all" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://www.crownpublishing.com/js/jquery.hoverIntent.minified.js"></script>
<script language="javascript" src="<?php bloginfo('template_directory'); ?>/tweet/jquery.tweet.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript" src="http://www.randomhouse.com/js/emv.js"></script>
<script language="javascript" src="<?php bloginfo('template_directory'); ?>/includes/RIFvalid.js" type="text/javascript"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>
<!--[if IE]>
<style>
.searchfield {
position:relative;
top:-1px;
}
</style>
<![endif]-->
</head>
<body>
<div id="BGcontainer">
<div id="container">
<div align="center" style="width:100%; background:#FFF;"><a href="http://www.facebook.com/ReadItForward"><img src="<?php bloginfo('template_directory'); ?>/images/readitforward_ad.jpg" style="max-width:700px; border: 15px solid white"/></a></div>
<div id="header">
<div id="title">
<a href="<?php bloginfo('url'); ?>"><img src="http://www.osmproduction.com/RIF/wp-content/uploads/2012/02/NewRIF_logo.gif" border="0" alt="Read It Forward"></a><br />
<p>Sneak peeks at great reads, behind-the-scenes insights from authors, lively and provocative reader's guides, and fabulous free books</p>
<div class="clear"></div>
</div>
<div id="Hsocial">
<div id="Hscontainer">
<div class="clear"></div>
<a class="SCRIBDbutton buttonHover" href="http://www.scribd.com/document_collections/2697109"></a>
<a class="GRbutton buttonHover" href="http://www.goodreads.com/user/show/3313709"></a>
<a class="FBbutton buttonHover" href="http://www.facebook.com/ReadItForward"></a>
<a class="TWbutton buttonHover" href="http://twitter.com/readitforward"></a>
<a class="YTbutton buttonHover" href="http://www.youtube.com/user/crownbooks#g/c/CBA6E62882B7B93F"></a>
<a class="RSSbutton buttonHover" href="<?php bloginfo('rss2_url'); ?>"></a>
<div class="clear"></div>
<?php
if( function_exists('FA_display_slider') ){
FA_display_slider(64);
}
?>
</div>
</div>
<div id="searchBox">
<?php get_search_form(); ?>
</div>
<?php //MENU: http://spyrestudios.com/how-to-create-a-sexy-vertical-sliding-panel-using-jquery-and-css3/ ?>
<?php //SLIDEIN tab: http://spyrestudios.com/how-to-create-a-sexy-vertical-sliding-panel-using-jquery-and-css3/ ?>
</div>
</div>
<div align="center">
<ul id="nav" align="center">
<li class="navItem"><p class="navInfo"><a href="http://www.osmproduction.com/RIF/sample-page-2/" class="navLink">FREE BOOKS</a></p></li>
<li class="navItem"><p class="navInfo"><a href="http://www.osmproduction.com/RIF/sample-page-3/" class="navLink">READER REVIEWS</a></p></li>
<li class="navItem"><p class="navInfo"><a href="http://www.osmproduction.com/RIF/sample-page-4/" class="navLink">MEET THE AUTHOR</a></p></li>
<li class="navItem"><p class="navInfo"><a href="http://www.osmproduction.com/RIF/sample-page-5/" class="navLink">MEET THE EDITOR</a></p></li>
<li class="navItem"><p class="navInfo"><a href="http://www.osmproduction.com/RIF/sample-page-6/" class="navLink">BOOK GROUPS</a></p></li>
<li class="navItem"><p class="navInfo"><a href="http://www.osmproduction.com/RIF/sample-page-7/" class="navLink">FAVORITES</a></p></li>
<li class="navItemLast navMenu">
<p class="navInfo"><a href="" class="navLink">ALL CATEGORIES</a></p>
<div align="left">
<ul class="subNavMenu">
<li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page/">Book Groups</a></div></li>
<li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-2/">Critics Rave</a></div></li>
<li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-3/">Enthusiasms</a></div></li>
<li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-4/">Free Books</a></div></li>
<li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-5/">Gift Guide</a></div></li> <li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-2/">Living with Books</a></div></li>
<li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-6/">Meet the Author</a></div></li>
<li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-7/">Meet the Editor</a></div></li>
<li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-8/">Reader Reviews</a></div></li>
<?php //wp_list_categories('orderby=name&include=3343'); ?>
</ul>
</div>
</li>
<?php /*
<li class="navItemLast navMenu"><p class="navInfo"><a href="" class="navLink">RECENT ISSUES</a></p>
<ul class="subNavMenu">
<li>Test 1</li>
<li>Test 2</li>
<li>Test 3</li>
</ul>
</li>
*/?>
<?php //MENU: http://spyrestudios.com/how-to-create-a-sexy-vertical-sliding-panel-using-jquery-and-css3/ ?>
<?php //SLIDEIN tab: http://spyrestudios.com/how-to-create-a-sexy-vertical-sliding-panel-using-jquery-and-css3/ ?>
</ul>
</div>
</div>
<script>
$('.navItem').click(function() {
var newLink = $('a:first-child',this).attr("href");
if(newLink != "" && newLink != "#") {
window.location =newLink;
}
return false;
});
</script>
<script>
$('.navItem').click(function() {
var newLink = $('a:first-child',this).attr("href");
if(newLink != "" && newLink != "#") {
window.location =newLink;
}
return false;
});
</script>
UPDATE: Is there an app anywhere online to run tests for errors? I think it may be a missing closing tag somewhere, though I haven’t spotted it. I’ve ran syntax tests against PHP 4+ on a site I found, and appears I’m OK there.
Try turning debugging on.
http://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Log
This should give you an idea of where to start. Otherwise comment out all the php code on the page. Then uncomment them line by line until you find out what causes your page to break. This is where your syntax error will be.
Also, it is a bit unclear what
blow upis. It doesn’t work at all? Or it works, but the page isn’t displaying properly? The former case will be a php error, the latter likely a closing tag issue.