Title: Page Template, sidebar problems
Last modified: August 19, 2016

---

# Page Template, sidebar problems

 *  [lessthanweb](https://wordpress.org/support/users/lessthanweb/)
 * (@lessthanweb)
 * [16 years ago](https://wordpress.org/support/topic/page-template-sidebar-problems/)
 * Hi,
 * I’m doing a theme for my blog and can’t solve a problem.
 * Here’s the layout:
    – home/index page which is index.php where is_home() is working
   just fine.
 * – page template called with blog.php file. This page loads when i click on domain.
   com/blog (shows all posts). is_home() works the same way as on index page. Why?
   This is not the index page..
 * There is just 1 sidebar that’s used by all files and inside it, i use is_home.
   Also tried is_front_page, is template page and nothing works..
    Page template
   acts as index.php..
 * I haven’t set “front page” option in WP admin as index.php contains only stuff
   shown on index page.
 * So the problem is that while i show some stuff on index page sidebar with the
   is_home, the same stuff is also shown on page template called blog sidebar. While
   all other normal pages, posts, search,… show the correct sidebar.

Viewing 1 replies (of 1 total)

 *  Thread Starter [lessthanweb](https://wordpress.org/support/users/lessthanweb/)
 * (@lessthanweb)
 * [16 years ago](https://wordpress.org/support/topic/page-template-sidebar-problems/#post-1437615)
 * wp_reset_query(); <— adding this line to sidebar.php before conditional makes
   it work.
 *     ```
       wp_reset_query();
       if (is_home() == TRUE)
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Page Template, sidebar problems’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [lessthanweb](https://wordpress.org/support/users/lessthanweb/)
 * Last activity: [16 years ago](https://wordpress.org/support/topic/page-template-sidebar-problems/#post-1437615)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
