Home › Forums › Backend Issues (wp-admin) › List of field groups shows my POSTS instead of FIELD GROUPS › Reply To: List of field groups shows my POSTS instead of FIELD GROUPS
Thank you VoiD2008.
I don’t have any other plugins, but I added some lines (see below) to functions.php myself, in order to get the custom post types displayed in the main query.
I commented this out and all was normal again.
But still, I need the functionality of the code snippet. Any ideas?
This was the code that provoked the problem:
add_action( 'pre_get_posts', 'add_my_post_types_to_query' );
function add_my_post_types_to_query( $query ) {
if ($query->is_main_query() )
$query->set( 'post_type', array('commissionedproject', 'alexaproject') );
return $query;
}
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.