Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#25685 closed defect (bug) (fixed)

Twenty Fourteen: Allow custom page templates to be set as the front page

Reported by: iamtakashi's profile iamtakashi Owned by: lancewillett's profile lancewillett
Milestone: 3.8 Priority: normal
Severity: normal Version: 3.8
Component: Bundled Theme Keywords: has-patch dev-feedback
Focuses: Cc:

Description

The theme has two custom page templates, Full Width Page and Contributor Page templates. Users should be able to use either of temaplate for the front page if they wish to.

However front-page.php was added to the theme in [25021] and this is always used for the front page as per the template hierarchy therefore users are not able to set any custom page template as the front page.

We probably need to remove front-page.php and move the template part for the featured content and the wrapper (We maybe remove this) to templates that can be set as the front page.

Step to reproduce (Full Width Page):

  • Activate Twenty Fourteen.
  • Add some widgets to content sidebar to activate the sidebar.
  • Publish a page with the full width page template.
  • Select the published page as front page in the reading settings.
  • View the front page of the site. Content sidebar appears on the page.

Step to reproduce (Contributor Page):

  • Activate Twenty Fourteen.
  • Publish at least one post.
  • Publish a page with the contributor template.
  • Select the published page as front page in the reading settings.
  • View the front pageof the site. There is no contributor is displayed.

Attachments (1)

25685.diff (17.6 KB) - added by iamtakashi 10 years ago.

Download all attachments as: .zip

Change History (7)

#1 @celloexpressions
10 years ago

We should probably just do the featured content stuff if is_front_page in all of the page templates so that it automatically works regardless of them changing template. That way it should "just work" without users needing to specify a specific template for the homepage, letting them use whichever they prefer.

@iamtakashi
10 years ago

#2 @iamtakashi
10 years ago

Attached a patch to fix this issue.

#3 @lancewillett
10 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.8
  • Summary changed from Twenty Fourteen: Allow custom page templtes to be set as the front page. to Twenty Fourteen: Allow custom page templates to be set as the front page

#4 @lancewillett
10 years ago

  • Keywords dev-feedback added

I think this one needs more discussion. Let's bring it up during Tue office hours.

#5 @lancewillett
10 years ago

Discussed today in Twenty Fourteen office hours.

We agreed the approach in the patch -- though it adds more code to many template files -- is a good trade-off for allowing authors to use any page template as the front on their blog.

#6 @lancewillett
10 years ago

  • Owner set to lancewillett
  • Resolution set to fixed
  • Status changed from new to closed

In 25985:

Twenty Fourteen: allow any page to be set as the front page, removing requirement for front-page.php template file. Props iamtakashi, fixes #25685.

Note: See TracTickets for help on using tickets.