Support

Account

Home Forums Backend Issues (wp-admin) List of field groups shows my POSTS instead of FIELD GROUPS

Solved

List of field groups shows my POSTS instead of FIELD GROUPS

  • I have a problem in the wordpress back-end:

    Instead of the list of custom field groups
    a list of all my posts appears on the dashboard page of “Custom Fields”.
    But the “All” and “Published” numbers still refer to the field groups, not to the posts.

    In addition to this there is a php-alert at the top of the page:

    “Notice: Array to string conversion in /Applications/MAMP/htdocs/alexasteinbruckcom-wordpressed/wp-admin/edit.php on line 225”. I haven’t change the edit.php file.

    Any ideas much appreciated!
    Thanks,

    Alexa

  • First try to deactivate your plugins except ACF and see whats happened
    I guess some of your plugins changes behavior of how wp shows custom post types

  • 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;
    }
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.