Title: Multiple conditionals without using echo?
Last modified: August 19, 2016

---

# Multiple conditionals without using echo?

 *  Resolved [multiplier](https://wordpress.org/support/users/multiplier/)
 * (@multiplier)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/multiple-conditionals-without-using-echo/)
 * In page.php, I need a conditional that says, “If it’s the About page, display
   this text, if it’s the Contact page display this text, and for all other pages,
   display this text”.
 * I’ve seen examples of [multiple conditionals on the Codex page](http://codex.wordpress.org/Conditional_Tags),
   but they all use an echo. I have PHP functions within my text that won’t execute
   within the echo. Can anyone demonstrate how to make this work?

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

 *  [iridiax](https://wordpress.org/support/users/iridiax/)
 * (@iridiax)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/multiple-conditionals-without-using-echo/#post-766227)
 * Here is the format I use (you can use php between these):
 *     ```
       <?php if (is_page('about') ) { ?>
       <p>About text</p>
       <?php } elseif (is_page('contact') ) { ?>
       <p>Contact text</p>
       <?php } else { ?>
       <p>Default text</p>
       <?php } ?>
       ```
   
 *  Thread Starter [multiplier](https://wordpress.org/support/users/multiplier/)
 * (@multiplier)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/multiple-conditionals-without-using-echo/#post-766229)
 * Brilliant, thank you! It was the curly brace before the elseif I had neglected.

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

The topic ‘Multiple conditionals without using echo?’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [multiplier](https://wordpress.org/support/users/multiplier/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/multiple-conditionals-without-using-echo/#post-766229)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
