Hello,
I am using custom layout for a certain post type and want to hide a section, based on a meta-value of the corresponding post.
As i see adding adding dynamic content to css-class ord ID-Field does not work (just the name of the variable i used is inserted)
Is there any known way to achieve a behaviour to add a meta value as css-class to an element (in my case color section)?
thanks!
Hey Pflegehilfe24,
Thanks for getting in touch.
Unfortunately, this is currently not possible. You may need to create a custom wp_ajax script that retrieves a specific post meta and hides the section based on the value. The article and documentation below should help.
— https://benmarshall.me/wordpress-ajax/
— https://developer.wordpress.org/reference/hooks/wp_ajax_nopriv_action/
If you need further help with this customization, we suggest hiring a freelance developer or contact our partner, Codeable.
— https://kriesi.at/contact/customization
Thank you for your understanding.
Best regards,
Ismael