FacetWP + ACF Post2Post – re-index bidirectional posts

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?php

add_action( ‘acf/post2post/relationship_updated’, function( $post_id ) {
if ( function_exists( ‘FWP’ ) ) {
FWP()->indexer->index( $post_id );
}
});
{{/gist}}