Apologies in advance, I've asked this question before, but I don't think I explained well enough for a detailed answer.
Clarification on items covered below:
1. Native WordPress "User" Type
2. "Staff" Custom Post Type
3. "Article" Custom Post Type
I did a massive migration from Drupal to WordPress and relationships were created between custom post types "Staff" and "Article". Unfortunately, the relationship between "User" and "Article" in WP does not match.
We had modules on Drupal handling this that allowed schema to pull the correct relationship between "Article" and "Staff". That is broken now. The relationship is not broken. Just the ability to pull the correct author info and insert it into schema.
When schema tries to pull data for "Author" it only shows "admin" as the "User" (that's who posts articles for multiple authors) for every single article on the site.
I understand fully that this setup is not the typical WP way of handling author/post relationships.
My questions:
* Is there any way to connect the "Staff" custom post type, that has the author name and connection to "Articles" custom post type to their "User" ID in the WP user database and have that info passed to the schema plugin (using WPSSO right now)?
*or perhaps some other programmatic solution?
I'm at my wits end trying to make this work. There are many thousands articles and quite a few authors on the site. :-\
Thank you for your time and consideration. Let me know if I can explain this any better.
In WordPress the only way to "relate" or "connect" users to a post type is to simply make the user the author of the posts.
In your example I'm guessing the Staff post type is equivalent to the profile in the above example, in that each user has one Staff post, which means that they should be the author of that post.
You can then use Toolset relationships to connect Staff posts to Article posts, and you can have more than one Staff post connected to a single Article (so that it has multiple authors).
Once those connections are made you can, when displaying an Article for example, display the related Staff posts using a View with a relationship filter. You can use the wpv-post-author shortcode to output the author name or other author fields.
I'm not familiar with WPSSO so I don't know what's involved using that, but the relationships would be set up as above I believe.