Title: Very unexpected T_STRING error
Last modified: August 18, 2016

---

# Very unexpected T_STRING error

 *  [ianadams](https://wordpress.org/support/users/ianadams/)
 * (@ianadams)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/very-unexpected-t_string-error/)
 * So I’m trying to use is_home() in a simple if/then statement, and suddenly I’m
   getting this error:
 * `
    Parse error: parse error, unexpected T_STRING in /home/username/public_html/
   wordpress/wp-content/themes/awarmgun/structure/primary_navigation.php on line
   5
 * Here’s the contents of primary_navigation.php:
 * `
    
   <dl>
    <dt id="home"<? if(is_home()) echo(" class=\"currentpage\">Home</dt
   >"); else echo("><a href=\"/\"  title=\"The front page — where you’ll find the
   most recently posted stuff\">Home</a></dt>"); ?> <dd>The front page — where you’ll
   find the most recently posted stuff</dd> <dt id="archives"<? if(is_page('archives'))
   echo(" class=\"currentpage\">); ?><a href="/archives/" title="The archives — 
   older articles, listed by date">Archives</a></dt> <dd>The archives — older articles,
   listed by date</dd> <dt id="linkblog"<? if(is_page('linkblog')) echo(" class=\"
   currentpage\">); ?><a href=\"/linkblog/\" title=\"The Link Blog — an (almost)
   daily list of interesting links\">Link Blog</a></dt> <dd>The Link Blog — an (
   almost) daily list of interesting links</dd> </dl>
 * I’ve been wracking my brain trying to figure out what’s wrong with it, but as
   far as I can tell, there’s nothing wrong with it at all. Maybe I just need a 
   set of fresh eyes?
 * Thanks!
 * -ian

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/very-unexpected-t_string-error/#post-476532)
 * I am not a coder by any stretch of imagination… but aren’t you missing some important**{
   and }** brackets?
    [http://codex.wordpress.org/Conditional_Tags](http://codex.wordpress.org/Conditional_Tags)
 *  Thread Starter [ianadams](https://wordpress.org/support/users/ianadams/)
 * (@ianadams)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/very-unexpected-t_string-error/#post-476555)
 * Well, the brackets you don’t always need. I figured it out, though: I was missing
   some end quotes.
 * Thanks for the help, though! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Very unexpected T_STRING error’ is closed to new replies.

## Tags

 * [T_STRING](https://wordpress.org/support/topic-tag/t_string/)
 * [Unexpected](https://wordpress.org/support/topic-tag/unexpected/)

 * 2 replies
 * 2 participants
 * Last reply from: [ianadams](https://wordpress.org/support/users/ianadams/)
 * Last activity: [19 years, 7 months ago](https://wordpress.org/support/topic/very-unexpected-t_string-error/#post-476555)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
