Title: header.php conditional is not working
Last modified: August 21, 2016

---

# header.php conditional is not working

 *  [ivanronu](https://wordpress.org/support/users/ivanronu/)
 * (@ivanronu)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/headerphp-conditional-is-not-working/)
 * Hello!
 * I want to have a background slider only in homepage, all other pages will have
   a static background image.
    I have the following conditional on my site (header.
   php) to change the background outside the home page but is not working. Really
   frustrated here!
 * <?php
    if ( is_home() || is_front_page()) { require_once(TEMPLATEPATH . ‘/slider.
   php’); } else { require_once(TEMPLATEPATH . ‘/slider2.php’); } ?>
 * Also I have a /#!/ on the theme url, is this causing this malfunction?
 * Thanks in advance.

The topic ‘header.php conditional is not working’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [ivanronu](https://wordpress.org/support/users/ivanronu/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/headerphp-conditional-is-not-working/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
