Opened 2 years ago
Last modified 6 months ago
#17470 new enhancement
Display warning when editing the page_for_posts page
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Administration | Version: | 3.2 |
| Severity: | normal | Keywords: | has-patch ui-feedback needs-ui |
| Cc: | helenyhou, karmatosed, isaackeyet, sararcannon@…, sabreuse@…, bootsz, georgemamadashvili@… |
Description
I recently ran into a situation where someone was very confused by the page_for_posts setting and why their page edits were not being respected. It occurred to me that this feature is not terribly well described in the UI for users that don't already understand what it does.
The attached patch will simply add a warning as an admin_notice when you are editing the page that is specified as the page_for_posts page.
I used a class of error for the admin_notice, but updated might be more appropriate.
Attachments (2)
Change History (14)
alexkingorg — 2 years ago
- Milestone changed from Awaiting Review to Future Release
Related, #16379 - Better UI for doing "Page on Front"
I like the idea here.
comment:3
karmatosed — 11 months ago
- Cc karmatosed added
comment:4
isaackeyet — 11 months ago
- Cc isaackeyet added
Idea to solve this permanently as brought up in the UI chat July 10 2012:
- Pages have a new, hidden meta field to indicate "System Page" or something that better describes it. Pages are marked System Page when WP is using it as a placeholder for a custom blog set up, or a plugin can use it to indicate a page is used for a contact form (for example).
- Pages are highlighted with a meta description in the pages list, indicating why it's there (created by? reason?)
- Most importantly, these System Pages are grouped in the pages filter to be excluded from the regular list, so the list may read "All | Published | System Pages", which should be a better long term solution for this ticket specifically (user confusion).
comment:5
saracannon — 11 months ago
- Cc sararcannon@… added
This is a much-needed feature! I've found this to be a common cause of confusion among my clients. What needs to happen to get this patch added? I just tested it myself and it works as expected.
- Keywords ui-feedback needs-ui added
http://core.trac.wordpress.org/attachment/ticket/17470/17470.diff
OK, a disclaimer: This is my first patch ever, so please bear with me. This issue is something that I struggle with almost daily, so I couldn’t resist diving in.
As isaackeyet alluded to, this particular issue is really one instance of a larger problem, which is the current inability to distinguish between regular “content” pages, and pages that are used as placeholders for custom templates / dynamic content.
As a result, in putting together my first patch I've attempted to start looking at the big picture, and trying to set some kind of a foundation for the concept of "System Pages" as described by isaackeyet here: http://core.trac.wordpress.org/ticket/17470#comment:4.
The Patch:
Changes from alexking's original patch are essentially still in effect. The additional changes are as follows:
1) Setting a particular page as the "Posts Page" under Settings->Reading creates a new entry in wp_postmeta for the page's ID with the key "_system_page" and value set to "1".
2) Under the "Pages" tab, for each page displayed in the table WordPress will now check if the page has a "_system_page" meta value of 1. If it does, the "Edit" link is not displayed, allowing the using to only modify the Title and other basic attributes.
3) If the edit page happens to get accessed directly, the WYSIWYG editor is hidden (in addition to other irrelevant meta boxes).
So essentially, now instead of modifying behavior based on the value of “page_for_posts”, we have a meta key “_system_page” that can be applied not only to the page_for_posts, but also to any number of additional pages specified by a theme or plugin developer who need to create additional non-editable pages.
Next Steps:
1) UI changes to the Pages table & page editor to visually distinguish “system pages”, and possibly provide an explanation for why they behave differently.
2) Determine how developers to create additional system pages. My first thought was to extend the commenting convention on custom templates, to allow a developer to specify that a particular template should be treated as a “system page”.
My questions at this point:
- Are these changes extensive enough to warrant a separate ticket?
- Is something like this realistic to achieve for 3.5, or will it have to wait?
comment:10
SergeyBiryukov — 9 months ago
Related: #21665
comment:11
Mamaduka — 9 months ago
- Cc georgemamadashvili@… added
comment:12
SergeyBiryukov — 6 months ago
#14314 was marked as a duplicate.

Add an admin_notice when editing the page_for_posts page.