-
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
Add custom page template class to backend to detect a current page template #13339
Comments
Thanks for your contribute @spencerfinnell, but I still something can be a Pull Request to Gutenberg, because it should be apart of core. |
+1 I'd like the styles wrapper to also include the post type class; I frequently build sites where the base styling varies from post type to post type, not to mention simulating options like colorschemes and other options I may add controls for that need to be reflected in the visual editor. I'm currently using a modified version of @spencerfinnell's solution, but it doesn't get re-applied when switching between Code and Visual mode, which while an edge case does make things annoying. There needs to be some way of both detecting when the editor switches modes (spent all morning trying to find a way, no dice thus far), or otherwise one of the following:
|
+1 This should indeed be a core function |
+1! |
+1 |
+1 again! This is important for feature-parity to the classic editor. |
I have just come across this problem, trying to adjust the editor width for a specific page template. It doesn't make sense that this isn't in core. |
+1 |
+1 It would be great to see this functionality in the core. |
I believe this case is no longer need because with core/group we could wrap it well. |
@khoipro could you elaborate? It sounds like you're suggesting manually wrapping an entire page's content in a group block and applying an arbitrary class to it, which I can't see as being a viable solution. |
@khoipro it is not the same thing :) |
For reference, the BigBox workaround plugin mentioned above doesn't work very well now, because of #64534 - if you use a selector of This is probably a bug with that change @talldan , but I'm putting it here in case anyone else comes across the same issue. A workaround is now changing the CSS to |
Is your feature request related to a problem? Please describe.
I wish to create some full-width section and push them in a full-width template, but we need to match both backend and frontend styling. Currently, a default style in Gutenberg keep too narrow width and can't override for a custom page template.
Describe the solution you'd like
Add page template class after a page with a custom template was saved. It should be stay in one of these elements::
For example, I can use:
It will help us keep a custom page template separate from other posts.
Describe alternatives you've considered
Looking for
section
method to replace it. Check #4900The text was updated successfully, but these errors were encountered: