Custom Post Type & Author not associating, user post count is 0, api doesn’t return author in post objects

There was an associated post to this one that shed light on this answer. When registering the post type, I was not setting enough fields in the ‘supports’ array of the register_post_type. Adding author, whatdayaknow, gives me the data I’m looking for.

Thanks to @milo for being on the right path!

register_post_type(self::POST_TYPE,
  array(
   'labels' => $labels,
   'public' => true,
   'has_archive' => true,
    'description' => __(""),
       'supports' => array(
          'title', 'author'
    ),
  )
)

NOTE: Post count in the User Accounts page is still 0 – but, the API is returning the data I want/need.

Leave a Comment