Title: need help with php if/else
Last modified: August 19, 2016

---

# need help with php if/else

 *  [rawwebdesign](https://wordpress.org/support/users/rawwebdesign/)
 * (@rawwebdesign)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/need-help-with-php-ifelse/)
 * Hi,
 * With some help from all of you wonderful forum posters, I’ve come up with this
   for my header’s meta-description:
 *     ```
       <?php if( is_home() ) : ?>
       <meta name="description" content="Web Design, Web Development, and Search Engine Optimization in Columbus, Ohio" />
   
       <?php else : ?>
       <meta name="description" content="<?php the_excerpt() ?>" />
   
       <?php endif; ?>
       ```
   
 * Now that I’m adding Ultimate Tag Warrior, I wanted to insert another condition
   that I thought would look like this:
 *     ```
       <?php if( is_home() ) : ?>
       <meta name="description" content="Web Design, Web Development, and Search Engine Optimization in Columbus, Ohio" />
   
       <?php if( is_tag() ) : ?>
       <meta name="description" content="You are now checking out all posts about <?php UTW_ShowCurrentTagSet('tagsetcommalist') ?>" />
   
       <?php else : ?>
       <meta name="description" content="<?php the_excerpt() ?>" />
   
       <?php endif; ?>
       ```
   
 * But the whole site just breaks when I put that in… what am I missing?
 * Thanks soooo much to anyone who can help…
 * Brad

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

 *  [lexhair](https://wordpress.org/support/users/lexhair/)
 * (@lexhair)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/need-help-with-php-ifelse/#post-678763)
 * Try `elseif( is_tag())`
 *  Thread Starter [rawwebdesign](https://wordpress.org/support/users/rawwebdesign/)
 * (@rawwebdesign)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/need-help-with-php-ifelse/#post-678809)
 * lexhair,
 * that works so perfectly. thanks a bundle.
 * -brad

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

The topic ‘need help with php if/else’ is closed to new replies.

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [rawwebdesign](https://wordpress.org/support/users/rawwebdesign/)
 * Last activity: [18 years, 5 months ago](https://wordpress.org/support/topic/need-help-with-php-ifelse/#post-678809)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
