Skip Navigation

[Resolved] Display author role in a view

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user would like to display the author's role in a view.

Solution:
Currently, there is no built-in way to display the post author role. You will have to build a custom shortcode that takes a post_id or a user_id and returns the role. Check these previous tickets, they may help:
- https://toolset.com/forums/topic/wpv-user-role/#post-227833
- https://toolset.com/forums/topic/conditional-display-based-on-user-role-of-post-author/

This support ticket is created 4 years, 4 months ago. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9: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: Africa/Casablanca (GMT+01:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Stina 4 years, 4 months ago.

Assisted by: Jamal.

Author
Posts
#1691279

Tell us what you are trying to do?
I have a list of items and I want to show the role of the author of each item in the list.
I can add the field of almost any other information about the author, but the role.
What am I missing?

#1691739

Hello and thank you for contacting the Toolset support.

Currently, there is no built-in way to display the post author role. You will have to build a custom shortcode that takes a post_id or a user_id and returns the role. Check these previous tickets, they may help:
- https://toolset.com/forums/topic/wpv-user-role/#post-227833
- https://toolset.com/forums/topic/conditional-display-based-on-user-role-of-post-author/

I hope this helps. Let me know if you still have a question.

#1692051

Thanks for the links, I'll figure it out.