Title: Condense PHP
Last modified: August 19, 2016

---

# Condense PHP

 *  [Doobus](https://wordpress.org/support/users/doobus/)
 * (@doobus)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/condense-php/)
 * I apologize if this is in the wrong forum.
 * I was looking through the conditional tags, and I was wondering if there was 
   a way to condense the php for:
 * <?php if (is_home()): ?>
 * I would like to also put is_single in there, is there a way to do this without
   having to make one for single as well?
 * I was under the impression that <?php if (is_home()): is_single(); ?> would work.
   Hopefully that gives you a better idea of what I’m trying to achieve. Thanks 
   in advance.

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

 *  [fitztrev](https://wordpress.org/support/users/fitztrev/)
 * (@fitztrev)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/condense-php/#post-749768)
 * `<?php if ( is_home() || is_single() ): ?>` = “if this is the homepage of blog
   posts OR a single post…”
 * Replace `is_home()` with `is_front_page()` if you’re using a page for a static
   homepage.
 *  Thread Starter [Doobus](https://wordpress.org/support/users/doobus/)
 * (@doobus)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/condense-php/#post-749854)
 * Thanks I can’t stand to look at redundant code :P.

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

The topic ‘Condense PHP’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [Doobus](https://wordpress.org/support/users/doobus/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/condense-php/#post-749854)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
