SearchWP

This Documentation is for SearchWP Version 3

Available since: 3.0

searchwp_acf_remove_repeatable_children

View Parameters »

SearchWP by default will remove sub-fields (children) from repeatable field groups (e.g. Repeaters) because it assumes that setting up individual Custom Fields in your search engine(s) is more fine-grained than necessary for most use cases and has implemented first party support for ACF repeatables to encompass top level repeatable fields and all sub-fields using one representative Custom Field.

As a result, only the parent ACF Field will be displayed in the SearchWP Custom Fields dropdown, but you can customize this to show all sub-fields:

<?php
add_filter( 'searchwp_acf_remove_repeatable_children', function( $remove, $context ) {
// TODO: Determine whether ACF sub-fields should be removed from the Custom Fields dropdown.
return $remove; // true/false
}, 20, 2 );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$remove Boolean

Whether sub-fields are removed

$context Array

$context['post_type'] The post type

[wpforms id="3080"]