You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on making my theme to be compatible with Gutenberg. The theme has many page templates and each template has different options & layout, so I want to split them out according to the page template (After getting the page template, I will add a class to the body like page-template-{value}).
Question:
Is there a API/Hook to get the value? Or, should I use the JS: $('.editor-page-attributes__template select').val() to get it?
Regards
The text was updated successfully, but these errors were encountered:
OK, I used the JS to query the select value, BUT!!!!!!!!!!! This project use React tech so when the Page attributes is closed it wouldn't render the select tag. That means I have no way to get the value unless providing API or Hook. Help!!!!!!!!!!!!
Apologies for not being able to get to this request sooner! Some changes have happened to how Custom Editor Styles work and I have posted an explanation and example which may be helpful to you at #12874 (comment) and I would like to close this issue in favor of continuing the discussion there.
Thank you so much for your testing and asking questions about Gutenberg styling!
I am working on making my theme to be compatible with Gutenberg. The theme has many page templates and each template has different options & layout, so I want to split them out according to the page template (After getting the page template, I will add a class to the body like page-template-{value}).
Question:
Is there a API/Hook to get the value? Or, should I use the JS:
$('.editor-page-attributes__template select').val()
to get it?Regards
The text was updated successfully, but these errors were encountered: