-
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
Admin bar: Edit site link should open the current template #37850
Comments
Makes sense to me. Less clicks for sure. Would make it work the same as Edit Post/Page/other post type. I would not be happy if I clicked Edit Post and got taken to the list of posts vs. the post I wanted to edit. |
Alternatively, let this menu have two links, "Edit site" and "Edit template" which would lead to the current template, either in the site editor (for site templates) or the template editor (for single post/pages). |
Just dropping by to add a +1. I have found myself doing a lot of clicking around going into and out of Full Site Editing. The two biggest issues are the preview button not working in FSE, and not being able to get directly back to the template I am looking at from the front end. |
This was noted in the fifteenth call for testing for the FSE Outreach Program, which has a focus on creating and editing the categories template:
& again in a separate comment:
& even more in an additional comment:
|
I think a single 'Edit template' link could make sense as an accompaniment to 'Edit post'. We might even combine them into a single dropdown.
One other thing to consider is when to pass context to base templates. For example if I'm viewing my 'Hello World!' post and it uses the |
Because this is a UX pattern that we see pretty consistently in other page builders, I built a simple plugin (unaware of this open issue) to tackle this for myself. There's some holes in how we can determine the templates, so I think the final approach would require some better infrastructure to determine the active templates/template parts ( #32309 being a good example). I'm just including a link to my repo as a functional design proof of concept. I basically added some dropdown nodes under the "Edit site" link with more specific links to the templates that are visible. So a user could still select 'Edit Site' or they could navigate to a specific template/part by selecting one of the dropdown links. |
This is an interesting idea when looking to edit a template for a post. There are also times when there would only be an option to edit the template (i.e. there is not post), like the 404 page. In the below example, if I click "edit site" it just takes me to the main site editor (not the 404 template). |
I made an attempt at this:
|
@annezazu and @getdave — Continuing here as you recommended. @carolinan — The essence of my issue #49438 was a duplicate of this your very issue here.
|
It is really good to see this issue being worked on! I have met the same thing as well. Clicking Edit Site only goes to the Front Page Template. I expected it to open the template related to the page that I am on. |
It's my understanding that this would eventually require a Core patch for the I could not personally commit to working on this feature at this point in the release cycle. However, it is open for contributions should anyone like to take a look. The work @bacoords did in his Plugin looks like a good starting point. It could land initially in Gutenberg via the hooks API and thus won't need a Core patch. |
Opening the current template is the only logical outcome and what most users might expect. We should address this malfunction sooner rather than later. |
If this is resolved; there probably should be a hook exposed so that developers can obtain what template(s) are currently being rendered; solving #32309 |
@carolinan — Please copy my graphics from #49438 to your issue description on top.
|
I just created a core PR for this enhancement. Links
@porg, do you mind attaching your visual aid graphs to the core ticket - https://core.trac.wordpress.org/ticket/58746? |
@carolinan and everyone
|
…emplate. Adds a global, `$_wp_current_template_id`, to allow the 'Edit site' link in the admin bar to be aware of the current template and pass it to the Site Editor, so it can load the appropriate one directly. See WordPress/gutenberg#37850 for further discussion. Props Mamaduka, poena, abitofmind, audrasjb, mikinc860, alexstine, annezazu, beckej, jameskoster, bacoords, clubkert, paaljoachim, get_dave, priethor, skorasaurus. Fixes #58746. git-svn-id: https://develop.svn.wordpress.org/trunk@56209 602fd350-edb4-49c9-b593-d223f7449a82
…emplate. Adds a global, `$_wp_current_template_id`, to allow the 'Edit site' link in the admin bar to be aware of the current template and pass it to the Site Editor, so it can load the appropriate one directly. See WordPress/gutenberg#37850 for further discussion. Props Mamaduka, poena, abitofmind, audrasjb, mikinc860, alexstine, annezazu, beckej, jameskoster, bacoords, clubkert, paaljoachim, get_dave, priethor, skorasaurus. Fixes #58746. Built from https://develop.svn.wordpress.org/trunk@56209 git-svn-id: http://core.svn.wordpress.org/trunk@55721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Thanks so much everyone! I'm going to close this, as it should be fixed in this commit: If you notice this is not the case, please feel free to reopen! |
…emplate. Adds a global, `$_wp_current_template_id`, to allow the 'Edit site' link in the admin bar to be aware of the current template and pass it to the Site Editor, so it can load the appropriate one directly. See WordPress/gutenberg#37850 for further discussion. Props Mamaduka, poena, abitofmind, audrasjb, mikinc860, alexstine, annezazu, beckej, jameskoster, bacoords, clubkert, paaljoachim, get_dave, priethor, skorasaurus. Fixes #58746. Built from https://develop.svn.wordpress.org/trunk@56209 git-svn-id: https://core.svn.wordpress.org/trunk@55721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Yes. What you are showing appears to be something related to WordPress.com and not WordPress Core functionality. |
Description
Often when I use the "Edit site" link in the WordPress admin bar, it is because I want to edit the current template.
This can be a post/page or an archive (they should all work the same).
Instead, the link opens the index/home/front-page, and I have to find a way to navigate to the template I wanted to edit.
Step-by-step reproduction instructions
With a full site editing theme active:
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: