-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pages: Add posts page option to Add New Page #67648
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @markhowellsmead. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +515 B (+0.03%) Total Size: 1.83 MB
ℹ️ View Unchanged
|
Flaky tests detected in 154cb5c. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12183628393
|
It works 🎊 Would it be feasible to use the
Good instinct to include this note, and the 'Publish' label on the primary button. However, I totally missed it 🙈 Likely because it looks like help text for the input, so I subconsciously assumed it would be talking about the name of the new page. So I was surprised to see the page instantly published on creation. I should probably have paid more attention, but I wonder if it would be worth using |
I second Jay's thoughts—this information deserves to be more prominent. I also wonder if we should let the user decide where the page will be added: which menu, category, position. Otherwise, they may wonder if it'll be immediately visible to visitors or put somewhere they'll not be able to find it easily. |
I may not fully understand the background of this PR, so please excuse me if I'm wrong. Personally, I'm not sure if implementing this dropdown will be useful to users.
Instead of this dropdown, how about adding an action like "Set as posts page" to already published pages, similar to the "Set as homepage" action? Either way, I think it might be a good idea to get some feedback from @WordPress/outreach to see how many users would like this dropdown. |
Thanks all!
Yes, this sounds like it'll work well, I was completely guessing at the components I used here 😅
Great idea!
Ah this is interesting, I didn't think of providing more options before creating the page. It makes me think that publishing the page immediately perhaps isn't the best flow, as the user hasn't had the opportunity to edit any page settings before publishing.
True, it would definitely become annoying on a site where the conditions always mean that this dropdown is shown.
Yes, this sounds good. I wasn't sure which area to focus on first and I nearly bundled both of these PRs into one, but then this modal does feel slightly different to the other actions, and separating it out makes things easier to review. I'll continue over in #67650 for now. |
I agree that seeing this every time would be annoying (for pro users) and confusing (for other users). It gets in the way of a streamlined content creation process and IMO tries to move an administrative process into an editorial one. |
Yeah, I agree with a lot of the feedback others have already shared. Yes, we need to make it easier / more discoverable for users to decide what they want their blog page to be. But this here is too discoverable in my opinion. Changing this setting can have quite detrimental effects on your site, so it should only be done if you know what you are doing. And once it is set it should almost never actually get changed by someone again. |
Sounds good to me 👍
Glad to hear this, it really helps me understand and work through the issues we're trying to solve too! |
What?
This adds an additional page option to the Add New Page button on the Pages view, "Blog", when a static homepage is set, but
page_for_posts
is unset.I've also opened a separate PR that includes adding an action to reset the posts page from the Pages view, as I think it's important these options are introduced at a similar time to this PR: #67650.
Why?
Addresses #63667.
How?
Updates the
AddNewPostModal
function to handle creating a posts page in addition to creating a regular page. Based on the design in #63667.When the new option is selected, a new page is created, published, and set as the latest posts page. The new page must be published immediately as the posts page cannot be a draft.
Testing Instructions
Screenshots or screencast
Dropdown:
Modal: