humanmade / authorship

A modern approach to author attribution in WordPress.
GNU General Public License v3.0
66 stars 7 forks source link

Guest authors will never appear when `has_published_posts` user query var is used #145

Open roborourke opened 2 months ago

roborourke commented 2 months ago

The WP_User_Query class allows for a query var called has_published_posts that accepts an array of post types.

The direct result of using the var is that WordPress will add a sub query that finds all post_author values for published posts matching the post types to the WHERE clause.

The post_author column is of course the actual author, not the ones assigned via this plugin, so guest authors will never be returned in this instance.

Ideally we can find a way to make this work how you'd expect.

As it stands this is resulting in SEO plugins like Yoast exclude all guest authors from the author sitemaps.