2

I'm using the Roots theme which with custom css.

I'm using the page "Home" as the front page the page "Blog" as the blog page (in WP reading settings)

I'm trying to set the front page "Home" to use the template "full-width", but instead Wordpress ignores this and uses the "front page" template.

This only happens on the front page, I can set any other page to use the "full width" template.

Any ideas as to why this is happening and how I can resolve this?

I can post some more information if this is helpful. Just let me know what. Thanks.

2 Answers 2

4

This is by design - check out wp-includes/template-loader.php to see why.

Delete front-page.php and it will fallback to the page template.

1
  • Thanks so much, I thought I was going mad. I've just edited front-page.php to be full width as it's probably more useful to use a specific template for the front page. Do you know what the reasoning for WP ignoring the template for the front page? They should make it clearer in the template dropdown by disabling the option to change template when editing the home page.
    – baritoneuk
    Commented Jan 13, 2012 at 13:25
3

That is by design. Refer to the Template Hierarchy. The site front page is a special case, and has the following rules:

  1. front-page.php - Used for both Your latest posts or A static page as set in the Front page displays section of Settings -> Reading
  2. Page display rules - When Front page is set in the Front page displays section of Settings -> Reading
  3. Home Page display rules - When Posts page is set in the Front page displays section of Settings -> Reading

That says, basically:

  1. If the front-page.php template file exists, use it
  2. If not, and the front page is set to display a static page, then use the static page rules
  3. If not, and the front page is set to display the blog posts index, then use home.php
  4. If not, then use index.php

So, if your Theme includes front-page.php, then the front-page.php template file will always be used on your site front page, no matter what custom page template you assign to the page set to display the front page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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