Hello,
Thanks for the feedback!
I’m not a FacetWP/WP Grid user so I don’t really know how they work. What I can tell you is that ACFE Form use the native WP function wp_update_post()
(see documentation) to update the post behind the scene.
Small note: If you’re displaying the posts grid on the same page as the ACFE Form, you can try to refresh the page with F5
once the form is submitted. If that fixes the issue, it means the “Post Update” comes too late during the page render, and you need to redirect the form on submission using a Redirect Action (see documentation).
Other than that, I don’t know if these plugins automatically check the usage of wp_update_post()
to re-check their index, or if they require a manual intervention with some custom code/function to do it. I would recommend to contact their support, or check their documentation about this.
You can add some third party function in your “Post Action” submission using the acfe/form/submit_post
hook (see documentation). Usage example:
add_action('acfe/form/submit_post/form=my-form', 'my_post_submit', 10, 4);
function my_post_submit($post_id, $args, $form, $action){
// call third party function on post update
my_check_index();
}
If these plugins require you to set some custom argument passed to the wp_update_post()
, then you can alter the arguments using the acfe/form/submit_post_args
filter (see documentation). Usage example:
add_filter('acfe/form/submit_post_args/form=my-form', 'my_post_submit_args', 10, 3);
function my_post_submit_args($args, $form, $action){
// add third party argument
// passed to wp_update_post()
$args['my_check_index'] = true;
// return
return $args;
}
Note my_check_index
and my_check_index()
are just examples and won’t do anything. You need to contact the third party plugin support to know what method to use to trigger their “refresh” logic.
Hope it helps!
Have a nice day!
Regards.