Home › Forums › Gutenberg › Hide fields depending on block styles › Reply To: Hide fields depending on block styles
Alright, I got an OCD moment because I come back to this post every 6 months checking in if it’s been done so I wanted to give it a go.
I’m 99% there with only filters: https://gist.github.com/davidwebca/efe3bb9f69df0a0f007179c59872054a
With that, it works on full reload of the page in the admin, but not with changes, style changes or AJAX re-rendering… And you have to visit a Gutenberg page to activate the block styles cache, otherwise there’s no way WordPress knows about the block styles registered (🙄).
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.