Title: include sidebar
Last modified: August 19, 2016

---

# include sidebar

 *  [sasa2209](https://wordpress.org/support/users/sasa2209/)
 * (@sasa2209)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/include-sidebar/)
 * Hi, I need to include another sidebar along with the default sidebar into the
   home page inside of the if statement. Help please. Here’s the code:
 *     ```
       <?php if (is_page('Home')) { get_sidebar();}
       else if (is_page('offers')) { get_sidebar(sidebar2); }
       else { echo""; } ?>
       ```
   
 * Thanks

Viewing 1 replies (of 1 total)

 *  [Steven](https://wordpress.org/support/users/spstieng/)
 * (@spstieng)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/include-sidebar/#post-1595837)
 * My guess is that you don’t have a sidebar file called sidebar-sidebar2.php?
 * See documentation here: [http://codex.wordpress.org/Function_Reference/get_sidebar](http://codex.wordpress.org/Function_Reference/get_sidebar)

Viewing 1 replies (of 1 total)

The topic ‘include sidebar’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Steven](https://wordpress.org/support/users/spstieng/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/include-sidebar/#post-1595837)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
