ACF: If field contain a specific value, update value in another field
ACF: If field contain a specific value, update value in another field
ACF: If field contain a specific value, update value in another field
How can I apply an ACF field to a single custom post if it refers to the taxomy of that post type in the rules?
I need to answer my own question here. I was using the attributes from TinyMCE v3, but it needed to use the v4 format. Here’s what works: add_action( ‘acf/input/admin_footer’, function() { ?> <script type=”text/javascript”> ( function( $ ) { acf.add_filter( ‘wysiwyg_tinymce_settings’, function( mceInit, id, field ) { mceInit[‘formats’][‘removeformat’] = [{ selector: ‘h1,h2,h3,h4,h5,h6,ul,li,b,strong,em,i,span,blockquote,pre,code’, remove: ‘all’, split … Read more
Thank you for your question. As other said, you can’t mix shortcode in the HTML attributes. You’ll need to edit the Ultimate Members PHP template. Check in their doc how to edit them in a child theme to not lose them on Ultimate Member update. You will need to make something like: <?php if ( … Read more
Widget Code / Advanced Custom Fields / Elementor
As @Vincius mentioned above, I don’t think anyone has created a full-blown calendar with ACF and ACF alone. But – that doesn’t mean you can’t plug into other Event Calendars (or –> attach the ACF data onto their Events post type). For example: Sugar Event Calendar It has a filter hooks (look on that page, … Read more
Whenever in doubt, consult the documentation and nice plugins like ACF are very well documented. It depends on how you set the image field, but from this page Field Types -> Image, looks like you set you field to return an object. Instead of using the_field, which prints the value, you need get_field: $category_image = … Read more
You’ll have to look in the database to see how ACF stores the checkbox values. As far as I know, they’re not saved as flat meta values under a single key, which makes it not possible to efficiently query on that data. The queries you have now aren’t going to work, you’re just loading a … Read more
Note that get_field returns false and not an empty string when no value is found. It’s not written in the docs there but you can try a var_dump on an empty get_field item to confirm. So you should check them against false. I’ve broken down each condition on its own line for the sake of … Read more
I think the Multiple Category Selection plugin will do what you’re looking to do. Worth a look anyway…