Saltar navegación

[Resuelto] Cannot list custom role user in author dropdown

This support ticket is created hace 2 años, 2 meses. There's a good chance that you are reading advice that it now obsolete.

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Minesh hace 2 años, 2 meses.

Asistido por: Minesh.

Autor
Mensajes
#2588195
Screenshot 2023-04-06 at 8.47.29 PM.png
Screenshot 2023-04-06 at 8.43.54 PM.png

Dear Sir/Madam,

I have a custom user role 'Applicant', I want to list out all applicant in the author dropdown from the application custom post.

I add below code but I can only see the original author and administrator in list

function wpdocs_add_members_to_dropdown( $query_args, $r ) {
 
    $query_args['role__in'] = array( 'applicant', 'administrator' );
    unset( $query_args['who'] );
 
    return $query_args;
}
add_filter( 'wp_dropdown_users_args', 'wpdocs_add_members_to_dropdown', 10, 2 );

Please advise how I can list all other applicant user in list.

#2588751

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I'm not sure why its not working with your site.

What if you try to follow the following blog post and try to adjust your desired role name and then check if that help you to resolve your issue.
- enlace oculto