Title: Title PHP statement
Last modified: August 18, 2016

---

# Title PHP statement

 *  [jwpettit](https://wordpress.org/support/users/jwpettit/)
 * (@jwpettit)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/title-php-statement/)
 * I’m having trouble understanding the Title PHP statement:
    `<?php bloginfo('name');?
   > <?php if ( is_single() ) { ?> Â» Blog Archive <?php } ?> <?php wp_title(); ?
   >`
 * I would like to insert:
    `bloginfo('description')` after the name statement ONLY
   when you are on the main site index. I know that i need an “if (is_page(index.
   php)) else ….” (or something like that), but not sure how to incorporate that.
   Any help? Thanks.

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

 *  [softius](https://wordpress.org/support/users/softius/)
 * (@softius)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/title-php-statement/#post-158698)
 * The code is: `<?php if ( is_home() ) bloginfo('description'); ?>`
 *  Thread Starter [jwpettit](https://wordpress.org/support/users/jwpettit/)
 * (@jwpettit)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/title-php-statement/#post-158699)
 * I worked on this for 30 mins, write this post, and boom…i get it. Here it is:
   `'
   <?php bloginfo('name'); ?> <?php if ( is_home() ) { ?>Â» <?php bloginfo('description');?
   ><?php } ?> <?php if ( is_single() ) { ?> Â» Blog Archive <?php } ?> <?php wp_title();?
   >'
 *  Thread Starter [jwpettit](https://wordpress.org/support/users/jwpettit/)
 * (@jwpettit)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/title-php-statement/#post-158700)
 * thanks softius!

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

The topic ‘Title PHP statement’ is closed to new replies.

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [jwpettit](https://wordpress.org/support/users/jwpettit/)
 * Last activity: [21 years, 1 month ago](https://wordpress.org/support/topic/title-php-statement/#post-158700)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
