Opened 17 months ago
Last modified 3 months ago
#19627 assigned feature request
Themes should be able to opt-in to a static front page
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Themes | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | iandstewart, chip@…, jared@…, emil@…, johnbillion@…, raven@…, philip@…, mark@…, dromsey@…, rfair404, lancewillett, kwight@…, edward.caissie@…, mercijavier@…, MZAWeb, sabreuse@…, ben@…, anointed, eddie.moya+wptrac@…, georgemamadashvili@…, eric.andrew.lewis@…, karmatosed, kovshenin, info@… |
Description
A theme should be able to register that they are designed to have a static front page by default. Core should then pick up on this as part of the activation process and allow them to pick or create a page, or ignore it and show posts on the front.
Twenty Twelve will most likely need this (http://wpdevel.wordpress.com/2011/12/20/default-theme-twenty-twelve/).
Attachments (1)
Change History (39)
comment:1
iandstewart — 17 months ago
- Cc iandstewart added
comment:2
chipbennett — 17 months ago
- Cc chip@… added
comment:4
emiluzelac — 17 months ago
- Cc emil@… added
comment:5
johnbillion — 17 months ago
- Cc johnbillion@… added
- Cc philip@… added
comment:8
markmcwilliams — 17 months ago
- Cc mark@… added
comment:10
rfair404 — 17 months ago
- Cc rfair404 added
comment:11
lancewillett — 17 months ago
- Cc lancewillett added
comment:12
kwight — 17 months ago
- Cc kwight@… added
comment:13
cais — 17 months ago
- Cc edward.caissie@… added
comment:14
mercime — 17 months ago
- Cc mercijavier@… added
comment:15
MZAWeb — 17 months ago
- Cc MZAWeb added
comment:16
sabreuse — 17 months ago
- Cc sabreuse@… added
comment:17
husobj — 17 months ago
- Cc ben@… added
comment:18
anointed — 17 months ago
- Cc anointed added
comment:19
Master Jake — 17 months ago
- Cc chappellind@… added
Master Jake — 17 months ago
comment:20
Master Jake — 17 months ago
19627-patch1.diff is an example of the latter. It allows a theme to register that it is optimized to be used with a static front page template by appending the following line to the theme's style.css file:
Front Page: static
comment:21
eddiemoya — 17 months ago
- Cc eddie.moya+wptrac@… added
comment:22
Mamaduka — 16 months ago
- Cc georgemamadashvili@… added
comment:23
ericlewis — 15 months ago
- Cc eric.andrew.lewis@… added
comment:24
nacin — 15 months ago
- Owner set to koopersmith
- Status changed from new to assigned
This came up in IRC today during the weekly meeting. It is going to be end up being super-simple.
add_theme_support( 'static-front-page' )
All this will do is add another section to the 3.4 customizer that lets the user know the theme explicitly supports a designed static front page, and offer the same dropdown already provided for at wp-admin/options-reading.php.
Assigning to koopersmith as this will have zero implementation outside of the customizer.
comment:25
ocean90 — 15 months ago
My idea is to use something like add_theme_support( 'static-page' , array( 'front' => (ID|slug), 'posts' => (ID|slug) ), the array is optional.
The Customizer will fetch this and shows the same dropdown menu as on options-reading.php. The values, defined in the array, will be selected by default. If the user wants to use a static page, he/she just needs to check/confirm it.
comment:26
nacin — 15 months ago
Perhaps the add_theme_support() call could allow for a description from the theme letting them know about their implementation. A distributed theme isn't going to be able to line up post slugs or IDs.
comment:27
nacin — 15 months ago
I think this requires #16379 to not suck.
comment:28
ocean90 — 13 months ago
Should we just support add_theme_support( 'static-page' ) for 3.4 and maybe extend it with 3.5 and Twenty Twelve?
The Customizer should, if the theme supports it, display the setting section for a static page .
comment:29
nacin — 13 months ago
Any theme hypothetically supports a static front page already. I think the add_theme_support() call is only good for descriptive text as to what the theme does special when it comes to static headers (or an explicit "Your theme supports a static front page." line).
comment:30
ryan — 13 months ago
- Milestone changed from 3.4 to Future Release
comment:31
karmatosed — 10 months ago
- Cc karmatosed added
comment:32
lancewillett — 10 months ago
Discussed at dev hack day at WCSF 2012, we are going to keep it at future release and not work on this for 3.5.
comment:33
Master Jake — 9 months ago
- Cc chappellind@… removed
comment:34
follow-up:
↓ 35
chipbennett — 4 months ago
What are the odds that this makes the 3.6 cut?
comment:35
in reply to:
↑ 34
emiluzelac — 4 months ago
comment:36
kovshenin — 4 months ago
- Cc kovshenin added
comment:37
toscho — 4 months ago
- Cc info@… added
comment:38
chipbennett — 3 months ago
Potentially related: #23669

Should it perhaps display a select box with a list of pages to choose from or simply give a notice that the theme is recommended to be used with a static home page and give a link to the reading settings page (similar to how a theme supporting widgets gives a link to configure them)?