"Parse error: Syntax Error" for Wordpress Theme?
I’m trying to upload a customized Wordpress theme and I keep getting this error when I try to activate the theme:
Parse error: syntax error, unexpected T_STRING in /home/content/t/r/e/tremak/html/wordpress/wp-content/themes/brown_theme/index.php on line 4
——————————————————–
Line 4 is where my PHP code begins ****
<!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">
<head>
**** <title><?php wp_title(‘«’ true, ‘right’); ?>
<?php bloginfo(‘name’); ?></title>
<style type="text/css">
@import url("<?php bloginfo(’stylesheet_url’); ?>");
</style>
<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 wp head(); ?>
</head>
I put the asteriks there to show where Line 4 is
Also: I’m using the book, "Wordpress 2.7 Complete" by April Hodge Silver to help me with this. I got to up to page 134 and ran into this problem.
Was there a reason that the asterisks were there?
Found your problem.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<title><?php wp_title(‘«’ true, ‘right’); ?>
<?php bloginfo(‘name’); ?></title>
<style type="text/css">
@import url("<?php bloginfo(’stylesheet_url’); ?>");
</style>
<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 wp head(); ?>
</head>
Try that. It ran off on mine and did the usual Yahoo Answers … deal and caused the Doctype to run into the head and style tags. Neither of my programs (WeBuilder 2010, DreamWeaver CS4, or WeBuilder 2008) gave me a syntax error on it. I <3 WP too!
-Billy







Was there a reason that the asterisks were there?
Found your problem.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<title><?php wp_title(‘«’ true, ‘right’); ?>
<?php bloginfo(‘name’); ?></title>
<style type="text/css">
@import url("<?php bloginfo(’stylesheet_url’); ?>");
</style>
<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 wp head(); ?>
</head>
Try that. It ran off on mine and did the usual Yahoo Answers … deal and caused the Doctype to run into the head and style tags. Neither of my programs (WeBuilder 2010, DreamWeaver CS4, or WeBuilder 2008) gave me a syntax error on it. I <3 WP too!
-Billy
References :
http://billym.macabreink.com I so wanna see your site when you’re finished with it.