Get ACF time in His format
Get ACF time in His format
Get ACF time in His format
How to indicate a parent child category relationship when bulk importing
How can I update an ACF field in a repeater on post save?
Try adding “editorScript”: [ “jquery”, “slick”, “app” ], to your block.json file. https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#editor-script Change out the array to call the scripts needed to load in your editor.
I posted on ACF site, they were very helpful in finding the solution. if( get_field(‘field_name’) && get_field(‘field_name’)) { } Was that solution I was looking for. I knew it was never asked because it was simple logic :/ Slowly learning as I go. Hope this helps someone.
If I understand this correctly, you want the whole code inside if ($type == “payment-services”) to run only once. There might be an easier way to do this, but a suggestion is: Add a variable with a certain value before your for loop (e.g. $run=”yes”) Put the code you only want to run the first … Read more
The method to use is… In the acf_add_options_sub_page declaration, add ‘post_id’ => ‘article’ as a parameter. (post_id) This is how the field data, as entered on the Options page corresponding to my post type, will be saved. On the display end, display using $featured_posts = get_field(‘featured_posts’, ‘article’); ‘article’ and ‘report’ are both used. In my … Read more
Custom headings on WYSIWYGs per flexible content module in ACF
The $post_id value get in save_post hook might be revision ID. So to retrieve real post ID, you can use this function wp_is_post_revision() Try to change your code as follows, function set_post_title_from_acf($post_id) { // If this is a revision, get real post ID if ( $parent_id = wp_is_post_revision( $post_id ) ) $post_id = $parent_id; $my_post … Read more
Updating post object via ACF breaks front-end