• Resolved strawberrymedicalat

    (@strawberrymedicalat)


    OK, so I’m making my own theme. I’m about a quarter of the way through, and now I’m getting this error on my webpage –

    “Parse error: syntax error, unexpected T_STRING in /home/strawber/public_html/wp-content/themes/Tutorial/index.php on line 27”

    I can’t find what it is that’s causing it :/

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
    <html xmlns=”https://www.w3.org/1999/xhtml”&gt;
    <head profile=”https://gmpg.org/xfn/11″&gt;

    <title><?php bloginfo(‘name’); ?><?php wp_title(); ?></title>

    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />
    <meta name=”generator” content=”WordPress <?php bloginfo(‘V1.0’); ?>” /> <!– leave this for stats please –>

    <link rel=”stylesheet” href=”<?php bloginfo(‘/www/wp-content/themes/Tutorial/style.css’); ?>” type=”text/css” media=”screen” />
    <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”<?php bloginfo(‘rss_url’); ?>” />
    <link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”<?php bloginfo(‘atom_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />

    <?php wp_get_archives(‘type=monthly&format=link’); ?>
    <?php //comments_popup_script(); // off by default ?>
    <?php wp_head();?>
    </head>
    <body>

    <div id=”header”>
    <h1>
    “><?php bloginfo(‘name’);?>
    </h1>
    <?php bloginfo(’description’);?>
    </div>

    As far as I can see, line 27 is just “</head>”, and there’s nothing wrong with that, is there? I think it’s something to do with the stuff in the <div id=”header”> tags, because I started having issues when I was writing those, particularly the ‘description’ part.

    Any suggestions…? :/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’d suspect it’s a plugin outputting something (incorrectly) through wp_head().

    Thread Starter strawberrymedicalat

    (@strawberrymedicalat)

    That sounds like it’s along the right lines…but is there anything else similar it could be (because I don’t have any plugins installed)?

    Sorry, I went by your statement that </head> appeared to be line 27 in your template(s). Actually, that final </div> is, and looking closely at the line above it shows the cause:

    <?php bloginfo(’description’);?>

    Note the curly quotes around description. Those should really be straight quotes:

    <?php bloginfo('description');?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘“Parse error: syntax error, unexpected T_STRING”’ is closed to new replies.