Hi,
I have multisite and I have created custom options by following this steps:
https://www.advancedcustomfields.com/add-ons/options-page/
So for ex now I have category as text fields exist for every site as an acf-options.
I want to get the sites by that custom acf-option.
I tried to run this query:
$sites = get_sites(
array(
'search' => get_search_query(),
'search_columns' => array('path','domain','category')
)
);
And I tried as well to write hook for site_search_columns to add the category column:
function custom_hook( $search_columns, $search ) {
$search_columns[] = 'category';
return $search_columns;
}
add_filter( 'site_search_columns', 'custom_hook', 10, 3 );
But that’s dose really work, Any idea how to add the custom acf-options to site_search_columns ?
Thanks