Home › Forums › Backend Issues (wp-admin) › Relationship set to one post type showing all post types in selection. › Reply To: Relationship set to one post type showing all post types in selection.
Yep, turned out to be a custom function that was filtering search sitewide…
// search post types
function filter_search($query) {
if ($query->is_search) {
$query->set('post_type', array('post', 'project', 'team', 'perspective'));
};
return $query;
};
add_filter('pre_get_posts', 'filter_search');
Everything’s in order when I comment it out. Cheers!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.