WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the Roots WP Theme and for some reason when copy pasting the page-custom.php to create a home page template. The new homepage template is showing the sidebar but not the original page-custom template even though the two template files are exactly the same at this moment.

Can anyone explain why this might be?

share|improve this question
up vote 3 down vote accepted

Look at the config.php:

function roots_display_sidebar() {
  $sidebar_config = new Roots_Sidebar(
     * Conditional tag checks (http://codex.wordpress.org/Conditional_Tags)
     * Any of these conditional tags that return true won't show the sidebar
     * Page template checks (via is_page_template())
     * Any of these page templates that return true won't show the sidebar

  return $sidebar_config->display;

So if your home is not the front page the sidebar will be displayed. There is probably a way to adjust these settings per filter, but you can also just change the first array to …


… to hide the sidebar.

share|improve this answer
This was exactly it, thank you so much. How can I buy you a beer via the Internet? – dalanmiller Oct 7 '12 at 22:24
Good to see you got it solved. Make us happy by giving something back here with answers for other peoples questions. – toscho Oct 7 '12 at 22:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.