Rewrite comment form post ID on submit

This bit of code will update the comment_post_ID with the value submitted using your custom form. function wpse405448_update_comment( $comment_ID, $comment_approved, $commentdata ) { if ( isset($_POST[‘acf’][‘field_6278d64aecf19’]) && !empty($_POST[‘acf’][‘field_6278d64aecf19’]) ) { $comment_post_id = intval($_POST[‘acf’][‘field_6278d64aecf19’]); $com_arr = array( ‘comment_ID’ => $comment_ID, ‘comment_post_ID’ => $comment_post_id, ); wp_update_comment($com_arr); } } add_action( ‘comment_post’, ‘wpse405448_update_comment’, 10, 3 ); Make sure both … Read more

Search using ACF repeater

You can filter ACF repeater field sub fields on the front end using some jQuery. See basic example below. See live working demo here: https://jsfiddle.net/joshmoto/ns73z05b/ See comments in jQuery so you know what is happening. // faq filter input on keyup event $(‘#faq’).on(‘keyup’, ‘INPUT[type=”search”]’, function(event) { // get our elements let $faq = $(event.delegateTarget); // … Read more