Note: You are viewing the documentation for Version 3View Version 4 Docs

Documentation

View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Available since: 3.0

searchwp_acf_remove_repeatable_child

View Parameters »

By default SearchWP will omit sub-fields from Advanced Custom Fields repeatable fields (e.g. Repeater) in favor of using SearchWP’s ACF Repeatables support but you can use this hook to control whether individual fields are omitted from the Custom Field dropdown in the engine configuration UI:

See also: searchwp_acf_remove_repeatable_children

<?php
add_filter( 'searchwp_acf_remove_repeatable_child', function( $remove, $context ) {
// TODO: Determine whether this field should be removed.
reeturn $remove; // true/false
}, 20, 2 );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$remove Boolean

Whether this ACF sub-field should be omitted from the Custom Fields dropdown

$context Array

$context['metakey'] The ACF sub-field name
$context['post_type'] The post type

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP