Support

Account

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;
    }