This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: ASP and the relationship field of ACF

Home Forums Product Support Forums Ajax Search Pro for WordPress Support ASP and the relationship field of ACF Reply To: ASP and the relationship field of ACF

#19203
Ernest MarcinkoErnest Marcinko
Keymaster

Hi!

Well, it might be possible to get the related post objects and index them. For this to work, you will need to use the index table engine:
Index table introduction
Index table configuration + generation
Enabling the index
..and a custom code.

I have put together a small code snippet, but I did not test it yet, so please be careful. Add this to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!

Change the following variables as you need them:
$field_name -> The relationship field name
$index_title -> true or false, if you want to index the related post title
$index_content -> true or false, if you want to index the related post content

Once you have the code setup, you need to re-create the index table, and that should hopefully do it.