Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
roborourke opened this issue May 27, 2024 · 0 comments · May be fixed by #146
Open

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

roborourke opened this issue May 27, 2024 · 0 comments · May be fixed by #146

Comments

@roborourke
Copy link
Contributor

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.

roborourke added a commit that referenced this issue May 27, 2024
@roborourke roborourke linked a pull request May 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant