Home › Forums › ACF PRO › How to add custom class to admin_body_class based on ACF field data? › Reply To: How to add custom class to admin_body_class based on ACF field data?
My advice is to load some custom javascript in the admin and add/change/remove classes on the admin body using jQuery (or just vanilla).
– I was planning to write some vanilla js but did not find an easy way to fetch the ACF field data inside the JS. If you have an example JS snippet of how it can be done that would really help.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.