Title: php syntax error help
Last modified: August 20, 2016

---

# php syntax error help

 *  Resolved [Pete](https://wordpress.org/support/users/perthmetro/)
 * (@perthmetro)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/php-syntax-error-help/)
 * I was hoping someone could help me fix this up please, it gives me this error…
   
   Parse error: syntax error, unexpected T_ELSE in /home/outdoor/public_html/wp-
   content/themes/news_10/header.php on line 23
 *     ```
       <?php if (is_category()) ?>
       <?php echo 'Category:'; wp_title(''); ?>
       <?php else ?>
       <?php echo wp_title(''); ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [Pete](https://wordpress.org/support/users/perthmetro/)
 * (@perthmetro)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/php-syntax-error-help/#post-2538269)
 * Found this solution…
 *     ```
       <?php if (is_category()) { ?>
       <?php echo wp_title(''); ?>
       <?php } else { ?>
       <?php echo wp_title(''); ?>
       <?php } ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘php syntax error help’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [T_ELSE](https://wordpress.org/support/topic-tag/t_else/)

 * 1 reply
 * 1 participant
 * Last reply from: [Pete](https://wordpress.org/support/users/perthmetro/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/php-syntax-error-help/#post-2538269)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
