Problem: I would like to add Users in a custom role "Members" to the author select field in the post editor screen.
Solution: Add custom code to your child theme's functions.php file:
function wpdocs_add_members_to_dropdown( $query_args, $r ) { $query_args['role'] = array('member'); // Unset the 'who' as this defaults to the 'author' role unset( $query_args['who'] ); return $query_args; } add_filter( 'wp_dropdown_users_args', 'wpdocs_add_members_to_dropdown', 10, 2 );
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 2 replies, has 2 voices.
Last updated by 6 years, 3 months ago.
Assisted by: Christian Cox.