Knowledge Base

Index Table – Indexing ACF repeater field titles and contents

in Ajax Search Pro Tutorials Tags: acfindexrepeaterrepeater field

Using this custom code, you can enable indexing of Advanced Custom Fields repeater field post titles and/or contents for the current post. Change the following variables in the code as you need them

  • $field_names -> one or more repeater field names, separated by comma
  • $index_title   -> true or false, to index the post titles found in the repeater field
  • $index_content -> true or false, to index the post contents found in the repeater field

Add this custom code 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!