get_users / WP_User_Query returns empty when logged out

I figured out the issue is with the plugin Advanced Access Manager we used to create the custom role for Staff. There is a setting by default:

User Level Filter
Extend default WordPress core users and roles handling, and make sure that users with lower user level cannot see or manager users and roles with higher level.

This was causing them to not show on the front-end. Hope this helps if anyone comes across the same problem.

Leave a Comment