how to use css link in php code? - php

hi i'm doing my web programming h/w and got a problem
this is code :
<!DOCTYPE html>
<html>
<head>
<title>Music Viewer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="http://www.cs.washington.edu/education/courses/cse190m/09sp/labs/3-music/viewer.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div id="header">
<h1>190M Music Playlist Viewer</h1>
<h2>Search Through Your Playlists and Music</h2>
</div>
<ul>
<?php
$songs = glob("songs/*.mp3");
foreach ($songs as $songfile) {
$text = file_get_contents($songfile);
file_put_contents($songfile, strrev($text));
basename($songfile)
?>
<li><a href <?= "$songfile" ?>> <?= basename($songfile) ?></a> </li>
<?php
}
?>
<?php
$txt = glob("songs/*.txt");
foreach ($txt as $textfile) {
$textt = file_get_contents($textfile);
file_put_contents($textfile, strrev($textt));
basename($textfile)
?>
<li><a href <?= "$textfile" ?>> <?= basename($textfile) ?></a> </li>
<?php
}
?>
</ul>
</body>
</html>
this is about showing the song lists in the folder using glob
and i wanna apply same css style from html code which is
<link href="http://www.cs.washington.edu/education/courses/cse190m/09sp/labs/3-music/viewer.css" type="text/css" rel="stylesheet" />
how to do this ???

Related

Remove sidebar on some pages on Wordpress

I am trying to edit a Worpress template. Everything work as as expected except that I wish to have a page without sidebar - which is not included in that template.
To achieve this I went to the template's folder, duplicated the "page.php" and named it page-nosidebar.php. Over there I deleted the get_sidebar call script. Here is how it looks like now:
<?php /*
Template Name: No Sidebars
*/ ?>
<?php get_header(); ?>
<div id="single_cont">
<div class="single_left">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1 class="single_title"><?php the_title(); ?></h1>
<div class="single_inside_content">
<?php the_content(); ?>
</div><!--//single_inside_content-->
<br /><br />
<?php //comments_template(); ?>
<?php endwhile; else: ?>
<h3>Sorry, no posts matched your criteria.</h3>
<?php endif; ?>
</div><!--//single_left-->
<div class="clear"></div>
</div><!--//single_cont-->
<?php get_footer(); ?>
After this, I went to the page editor and assigned this new template to the page I wanted to have no sidebar. Problem? Sidebar still shows up.
How should I do? Thanks in advance!
UPDATE
footer.php
<div class="clear"></div>
<div id="footer">
<div class="footer_text"> <?php echo date("Y"); ?> Company. Powered by Company</div>
</div><!--//footer-->
</div><!--//main_container-->
<?php wp_footer(); ?>
</body>
</html>
header.php
<!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" xmlns:v="urn:schemas-microsoft-com:vml"> <head> <link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Raleway:400,100,200' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Cabin:700' rel='stylesheet' type='text/css'> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title><?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?></title> <?php wp_head(); ?> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> <!--[if lt IE 9]> <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script> <![endif]--> <!--<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>--> <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery-latest.js"></script> <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/scripts.js"></script> <script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.infinitescroll.js" type="text/javascript" charset="utf-8"></script> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" title="no title" charset="utf-8"/> <script type="text/javascript"> $(document).ready( function($){ $('#content_inside').infinitescroll({
navSelector : "div.load_more_text",
// selector for the paged navigation (it will be hidden)
nextSelector : "div.load_more_text a:first",
// selector for the NEXT link (to page 2)
itemSelector : "#content_inside .home_post_box"
// selector for all items you'll retrieve },function(arrayOfNewElems){
$('.home_post_box').hover( function() { $(this).find('.home_post_text').css('display','block'); }, function () { $(this).find('.home_post_text').css('display','none'); } );
//$('.home_post_cont img').hover_caption();
// optional callback when new content is successfully loaded in.
// keyword `this` will refer to the new DOM content that was just added.
// as of 1.5, `this` matches the element you called the plugin on (e.g. #content)
// all the new elements that were found are passed in as an array
}); } ); </script> </head> <body> <?php $shortname = "neue"; ?> <?php if(get_option($shortname.'_background_image_url','') != "") { ?> <style type="text/css"> body { background-image: url('<?php echo get_option($shortname.'_background_image_url',''); ?>'); } </style> <?php } ?> <div id="main_container"> <div id="header"> <div class="left"> <?php if(get_option($shortname.'_custom_logo_url','') != "") { ?>
<img src="<?php echo stripslashes(stripslashes(get_option($shortname.'_custom_logo_url',''))); ?>" class="logo" /> <?php } else { ?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/logo.jpg" class="logo" /> <?php } ?> </div>
<div class="right"> <div class="head_social">
<?php if(get_option($shortname.'_twitter_link','') != "") { ?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/twitter-icon.png" />
<?php } ?>
<?php if(get_option($shortname.'_facebook_link','') != "") { ?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/facebook-icon.png" />
<?php } ?>
<?php if(get_option($shortname.'_google_plus_link','') != "") { ?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/google-plus-icon.png" />
<?php } ?>
<?php if(get_option($shortname.'_dribbble_link','') != "") { ?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/dribbble-icon.png" />
<?php } ?>
<?php if(get_option($shortname.'_pinterest_link','') != "") { ?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/pinterest-icon.png" />
<?php } ?>
<div class="clear"></div> </div><!--//head_social-->
<div class="header_menu"> <!--
<ul>
<li>HOME</li>
<li>ABOUT</li>
<li>CATEGORIES
<ul>
<li>Wordpress Themes</li>
<li>Create Plugins</li>
<li>Wordpress Themes</li>
<li>Create Plugins</li>
</ul>
</li>
<li>BLOG</li>
<li>CONTACT</li>
</ul>-->
<?php wp_nav_menu('menu=header_menu&container=false&menu_id='); ?>
<div class="clear"></div> </div><!--//header_menu-->
<div class="clear"></div> </div> <div class="clear"></div> <div class="tagline"> <?php echo get_option($shortname.'_header_text','Use Neue Theme Settings to update this text...') ?> </div><!--//tagline-->
</div><!--//header-->

Button doesn't appear after while cycle even though it works if i put it before cycle

I have my footer.php with admin button in it and when i include it at the end of my page the button doesn't appear.. But if i put it before this code:
<?php if ($row["rights"]=="2"):?>
<div id='cssmenu-admin'>
<ul>
<li name='admin' class='active'><a href='administration.php'><span>Admin</span></a></li>
</ul>
</div>
<?php endif; ?>
from footer.php before while cycle it works like it should.
This my footer.php file:
<div id="footer">
<hr>Copyrighted (C) 2014 by djdanas#gmail.com<br>
<?php if ($row["rights"]=="2"):?>
<div id='cssmenu-admin'>
<ul>
<li name='admin' class='active'><a href='administration.php'><span>Admin</span></a></li>
</ul>
</div>
<?php endif; ?>
</div>
<br><hr>
And this is my page file:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Pagrindinis</title>
<link href="CSS/stilius.css" rel="stylesheet" type="text/css"/>
<link href="CSS/menu.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<?php require("includes/validate.php");?>
<?php require("includes/stilius.php");?>
<?php
require("includes/connection_to_db.php");
$sql = "SELECT prekės.* , CONCAT(vartotojai.name) as v_name
FROM prekės
LEFT JOIN vartotojai
ON vartotojai.V_ID=prekės.V_ID
ORDER BY prekės.date
DESC LIMIT 8";
$result = mysql_query("$sql");
?>
<?php mysql_close(); ?>
<?php while ($row = mysql_fetch_assoc($result)) : ?>
<?php $image = '<td><img src="data:image/jpeg;base64,'.base64_encode($row['image']).'" name="pix" width="270" height="200"/></td>' ?>
<table class="two">
<th><?php echo $row['name'] ?></th>
<th>Prekės savininkas: <?php echo $row['v_name']?></th>
<th><input type="button" value="Mainyti"></th>
<tr>
<?php echo $image?>
<td><textarea disabled style="resize:none; background-color:white" name="about" rows="12" cols="65"><?php echo $row['specs']?></textarea><td>
</table>
<?php endwhile; ?>
<?php require("includes/footer.php");?>
</body>
</html>
EDIT:
Ok, i solved my problem by adding new variable
$rights = $row['rights'];
right after
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Pagrindinis</title>
<link href="CSS/stilius.css" rel="stylesheet" type="text/css"/>
<link href="CSS/menu.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<?php require("includes/validate.php");?>
<?php require("includes/stilius.php");?>
in my page file and changed 1 line in my footer.php file from
<?php if ($row['rights']=="2"):?>
to
<?php if ($rights="2"):?>
now it's working like a charm :)
I'll take a stab in the dark here and say that your test
if ($row["rights"]=="2")
means you are checking to see if the user logged in has the "rights" of 2?
Then when you loop through your query...
while ($row = mysql_fetch_assoc($result))
You are overwriting your $row variable. So whatever you thought was in there to begin with, isn't anymore. You should use a different variable for either your user or looping through the query.
EDIT:
It's also possible that the variable isn't in scope once you get to where you are testing it. You could try using a print_r($row) in footer.php to see what is currently inside of $row -- that should help.

How to add content to PHP include files?

Ok I may not have the best title , but I will try to give a better explanation.
Let's assume you are using PHP include() to structure your website:
Header.php
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name=keywords content="somthiefn"/>
<title>Website</title>
<link rel="stylesheet" href="css/style.css" type="text/css">
<script src="Scripts/jquery-1.8.3.min.js"></script>
<link rel="icon" type="image/png" href="/images/favicon.ico" />
</head>
<body>
Footer.php
</body>
</html>
Then a sample page:
Index.php
<!--Header-->
<?php include ('includes/header.php'); ?>
<div class="content">
<!-- some content-->
</div>
<!--Footer-->
<?php include ('includes/footer.php'); ?>
Basically I just want to know if there is a way to load some script into my header section.
I would like to achieve something like ASP.NET and its master Page, where I can just add content the header. for example
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<script src="Scripts/somescript.js"></script>
</asp:Content>
Yes, you can do like this:
index.php
<?php
// Wanted page title
$title = "some";
// JS Files..
$scripts = array();
$scripts[] = '<script src="js/some.js" />';
$scripts[] = '<script src="js/some2.js" />';
$scripts[] = '<script src="js/some3.js" />';
// Include header
include ('includes/header.php');
header.php
<title><?php echo $title ?></title>
<?php echo implode("\n",$scripts) ?>
Of course the variables could be named as you want and contain any data. Main thing is that you can pass them between files like i showed.
In index.php, before you include header.php, you could set an array for your scripts like:
header.php
<?php if(!isset($scripts)) $scripts = array(); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name=keywords content="somthiefn"/>
<title>Website</title>
<link rel="stylesheet" href="css/style.css" type="text/css">
<script src="Scripts/jquery-1.8.3.min.js"></script>
<link rel="icon" type="image/png" href="/images/favicon.ico" />
<!-- Include dynamic scripts-->
<?php foreach($scripts in $script): ?>
<script src="<?php echo $script; ?>"></script>
<?php endforeach;?>
</head>
<body>
index.php
<?php
$scripts = array('Scripts/somescript.js', 'http://server.com/path/anoterscript.js);
?>
<!--Header-->
<?php include ('includes/header.php'); ?>
<div class="content">
<!-- some content-->
</div>
<!--Footer-->
<?php include ('includes/footer.php'); ?>
Do you want to add PHP code to the header? Then you can add your code between tags (or tags if short tags are enabled), but I would consider to just call an include between the PHP tags and have the logic in that include.
Another option could be a template engine, e. g. Smarty. In most of the templates engine you can define your own functions and call them from the templates.
You could do this:
// content.php
<?php
$head = "<!DOCTYPE html>
<html>
<head>
<meta http-equiv='content-type' content='text/html;charset=utf-8' />
<meta name='keywords' content='somthiefn' />
<title>Website</title>
<link type='text/css' rel='stylesheet' href='css/style.css' />
<script src='Scripts/jquery-1.8.3.min.js'></script>
<link type='image/png' rel='icon' href='images/favicon.ico' />
</head>
<body>";
$foot = "\n<body>\n</html>";
?>
// index.php
<?php
include 'includes/content.php';
$dom = new DOMDocument; #$dom->loadHTML($head);
$hd = $dom->getElementsByTagName('head'); $hd = $hd->item(0);
$script = $dom->creatElement('script');
$scriptAttr = $dom->createAttribute('src');
$scriptAttr->value= 'Scripts/somescript.js'; $script->appendChild($scriptAttr);
$hd->appendChild($script);
echo $dom->saveHTML().$foot;
?>
The other option is to use variables to separate your code then only echo portions. That is what I would do. It's technologically faster. Try this:
// content.php
<?php
$headTop = "<!DOCTYPE html>
<html>
<head>
<meta http-equiv='content-type' content='text/html;charset=utf-8' />
<meta name='keywords' content='somthiefn' />
<title>Website</title>
<link type='text/css' rel='stylesheet' href='css/style.css' />
<script src='Scripts/jquery-1.8.3.min.js'></script>\n ";
$headBottom = "\n <link type='image/png' rel='icon' href='images/favicon.ico' />
</head>
<body>";
$foot = "\n<body>\n</html>";
?>
// index.php
<?php
include 'includes/content.php';
echo "$headTop<script src='Scripts/somescript.js'></script>$headBottom$foot";
?>
You can see why you would use the second option.
This works for me. It dynamically loads title, scripts and styles.
header.php
<?php
if(!isset($scripts))
$scripts = array();
if(!isset($styles))
$styles = array();
?>
<!DOCTYPE html>
<html>
<head>
<title><?php echo $title ?></title>
<link rel="stylesheet" href="css/somestyle.css" type="text/css">
<script src=somescript.js"></script>
<!-- include styles -->
<?php foreach($styles as $style): ?>
<link href="<?php echo $style; ?>" rel="stylesheet">
<?php endforeach; ?>
<!-- include scripts-->
<?php foreach($scripts as $script): ?>
<script src="<?php echo $script; ?>"></script>
<?php endforeach;?>
</head>
<body>
index.php
<?php
$title = "some dynamic title";
$scripts = array('js/somescript.js', 'http://server.com/anoterscript.js');
$styles = array('css/somestyle.css', 'css/anotherstyle.css');
require_once ('header.php');
?>
<div class="content">
<!-- some content-->
</div>
<?php require_once('footer.php'); ?>

How can I incorporate inline CSS styles and stylesheets relating to one page only when using the PHP 'header'?

I have a 'header.php' file and I am incorporating it into my html pages using the following code:
<?php /*
$pageTitle = "Home";
$section = "Home";
include('inc/header.php');
?>
The PHP header file contains a number of CSS stylesheets. Some of these CSS stylesheets I only want to include on one page - e.g. I only want to include 'index.css' on the page 'index.php'. How can I include these stylesheets when I am using the same 'header.php' file in every page of the site?
Is there a way of specifying these styles in the individual pages themselves, rather than in the header file? If so, can these styles be placed in another element, even if the element has already been used (opened and closed) in the header file?
Here is the code for 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" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;">
<title><?php echo $pageTitle ?> || Young Academy </title>
<meta name="description" content="Based in Pinner in North-West London, the Young Academy has been creating the highest standard of musical and dramatic education for 30 years.">
<meta name="keywords" content="Piano, Flute, Music Theory, Singing, Violin, Concerts, Pinner, Middlesex, Harrow, Teacher">
<meta name="author" content="Barbara Young">
<!--Stylesheets!-->
<link rel="stylesheet" type="text/css" media="all" href="css/reset.css"/>
<link rel="stylesheet" type="text/css" media="all" href="css/text.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/960_16_col.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/style.css"/>
<link rel="stylesheet" type="text/css" media="screen" href="css/contact.css"/>
<!--Google fonts!-->
<link rel="stylesheet" type="text/css" media="all" href="http://fonts.googleapis.com/css?family=Quicksand:400,700">
<link href='http://fonts.googleapis.com/css?family=Titillium+Web' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Noto+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Karla:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Marck+Script' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,500,500italic,400italic' rel='stylesheet' type='text/css'>
**<link rel="stylesheet" type="text/css" media="screen" href="css/index.css"/>
<link rel="stylesheet" type="text/css" media="screen" href="css/bgaudioplayer.css"/>**
<!--Meta tags!-->
<meta name="author" content="Robert Young" />
<meta name="copyright" content="2013 by Robert Young" />
<meta name="keywords" content="Music lessons, Pinner, music tuition, piano lessons, speech and drama, London" />
<meta name="description" content="Site of the Young Academy, a private music tuition business based in Pinner" />
<script src="../js/modernizr.custom.63826.js"></script>
<script src="../js/html5shiv.js"></script>
</head>
<body>
<div class="header">
<div class="container_16 clearfix">
<ul class="nav grid_16 alpha">
<li><a class="<?php if ($section == "Home") {echo "here"; } ?>" href="index.php" accesskey="1"> Home </a></li>
<li><a class="<?php if ($section == "About Us") {echo "here"; } ?>" href="about_us.php" accesskey="2"> About </a></li>
<li><a class="<?php if ($section == "What We Do") {echo "here"; } ?>" href="what_we_do.php" accesskey="3"> What We Do </a></li>
<li><a class="<?php if ($section == "Enrolement") {echo "here" ; } ?>" href="enrolement.php" accesskey="4"> Enrolement </a></li>
<li><a class="<?php if ($section == "Contact Us") {echo "here" ; } ?>" href="contact.php" accesskey="5"> Contact Us </a></li>
<!--<li> Blog </li>-->
</ul>
<div id="logo">
<img src="img/Logo original.gif" alt="The Young Academy"/>
</div>
<div class = "grid_4 alpha">
<div class="telephone grid_4 alpha">
<img src="img/phone_icon_white.png" alt="small telephone logo" class="align-left small" />
<p> +44 (0)20 8866 3813 </P>
</div>
<div class="timezone">
<p><?php
date_default_timezone_set('Europe/London');
mktime(0,0,0,1,1,1970);
echo date('l, d F Y');
?> </p>
<!--<form action="http://www.example.com/login.php">
<p>
<input type="text name=search" size="20+" id="search" value="Search this site"
</p>
</form>!-->
</div>
</div>
<ul class="secondmenu grid_6 push_3">
<li><a class="<?php if ($section == "Musical Glossary") {echo "here" ; } ?>" href="glossary.php">Musical Glossary </a></li>
<li><a class="<?php if ($section == "FAQ") {echo "here" ; } ?>" href="faq.php">FAQ</a></li>
<ul>
</div>
I want to include the stylesheets in bold only on the index.php page. Can I include them like this:
<?php
include('inc/header.php');
?>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="css/index.css"/>
<link rel="stylesheet" type="text/css" media="screen" href="css/bgaudioplayer.css"/>
</head>
<article class="content">
<p class="grid_9 alpha"><i>Outstanding vocal and instrumental tuition.</i></p>
</article>
<article class="second-content">
<p class="grid_6 alpha omega">Develop a passion for music.</p>
</article>
<article class="third-content">
<p class="grid_5 alpha omega">Become a virtuoso.</p>
</article>
etc.
Any help would be much appreciated!
Thanks,
Robert.
I have just tried the above code and it happens to work! You can include head tags in both the header.php file and the main (index.php) site file.
Cheers!
long story short you need some sort of router. but Looking at your code it seems like you may not have a firm grasp on Object Oriented Programming. what you can do though is look at the URI with $_SERVER['REQUEST_URI'] if the string is lets say /about then load in resources for about-stylesheet.css.
You can do this with an if else statement that replaces the link to your CSS and refers to the unique variable you sent for the page you want to pull the CSS in for:
<link rel="stylesheet" type="text/css" media="screen" href="
<?php
if ($pageTitle == "Home") {
echo "css/index.css";
else ($pageTitle == "SomeOtherTitle") {
echo "css/relativelnk.css";
}
?>
"/>

Error in header.php broke my WP site?

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;"><img src="<?php bloginfo('template_directory'); ?>/images/readitforward_ad.jpg" style="max-width:700px; border: 15px solid white"/></div>
<div id="header">
<div id="title">
<img src="http://www.osmproduction.com/RIF/wp-content/uploads/2012/02/NewRIF_logo.gif" border="0" alt="Read It Forward"><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">FREE BOOKS</p></li>
<li class="navItem"><p class="navInfo">READER REVIEWS</p></li>
<li class="navItem"><p class="navInfo">MEET THE AUTHOR</p></li>
<li class="navItem"><p class="navInfo">MEET THE EDITOR</p></li>
<li class="navItem"><p class="navInfo">BOOK GROUPS</p></li>
<li class="navItem"><p class="navInfo">FAVORITES</p></li>
<li class="navItemLast navMenu">
<p class="navInfo">ALL CATEGORIES</p>
<div align="left">
<ul class="subNavMenu">
<li><div class="subNavItem">Book Groups</div></li>
<li><div class="subNavItem">Critics Rave</div></li>
<li><div class="subNavItem">Enthusiasms</div></li>
<li><div class="subNavItem">Free Books</div></li>
<li><div class="subNavItem">Gift Guide</div></li> <li><div class="subNavItem">Living with Books</div></li>
<li><div class="subNavItem">Meet the Author</div></li>
<li><div class="subNavItem">Meet the Editor</div></li>
<li><div class="subNavItem">Reader Reviews</div></li>
<?php //wp_list_categories('orderby=name&include=3343'); ?>
</ul>
</div>
</li>
<?php /*
<li class="navItemLast navMenu"><p class="navInfo">RECENT ISSUES</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 up is. 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.

Categories