Ok, found the problem. Had some code inside functions.php (from a previous project) messing with the search query..
// Extend search to include pages and posts
function wp_search_filter( $query ) {
if ( $query->is_search ) {
$query->set( 'post_type', array('post','page') );
}
return $query;
}
add_filter('pre_get_posts','wp_search_filter');
Removed it, and now everything is working as expected! Happy times! 😀
Thanks again James for pointing me in the right direction. Cheers!
Hi James,
Many thanks for taking the time to test this issue. You are absolutely right!
Just tested it myself on a new WP installation, with only ACF Pro and the search in the post object field works as expected. Search were able to find Media / attachments. :/
Will update this thread if I find whats causing this..