I have a custom post "member" and also a custom role "member", I did enable it from post type but I don't see the member author list from author dropdown even I login as administrator role in Incognito windows.
Hello. Thank you for contacting the Toolset support.
Can you please share on what post type you want to display the author belongs to member role and send me admin access details as well as tell me where you added the code you shared.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I can change the author to the custom post 'member' using Block editor mode but not classic mode. Refer to screenshot, demomember is the user in member role.
I put below script to functions.php
// Handles the Quick Edit authors dropdown
function display_custom_roles_in_author_dropdown($query_args, $r)
{
if (isset($r['name']) && ($r['name'] === 'post_author_override' || $r['name'] === 'post_author')) {
if (isset($query_args['who'])) {
unset($query_args['who']);
}
$query_args['role__in'] = ['administrator', 'author', 'editor'];
}
return $query_args;
}
add_filter('wp_dropdown_users_args', 'display_custom_roles_in_author_dropdown', 10, 2);
It works to standard WP posts but not Toolset custom post, I attached both Toolset post and WP posts for your reference.