Limit Items in Views based on user role

Est. Reading: 1 minute
By: morvarghmatt
Created: 12/16/2017
Category:
Difficulty: Intermediate

Limit Items in Views based on user role

×Warning: This tutorial was created 2415 days ago. Some of the information may be out of date with more recent versions of Formidable. Please proceed with caution and always perform a backup before adding custom code.

I'm sure a lot of you know how to do this but it could be helpful to others down the road.

I have a case where I'm displaying a list of users in a table and needed to have a hyperlink to further detail; but only have this available for users with the editor role and above, anyone other role would just see the users name.

After a bit of searching I came to this solution:

In the <td> add the following:

 ADD CONTENT FOR EYES ONLY EDITORS HERE  ADD CONTENT FOR EVERYONE ELSE HERE 

Leave a Reply

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crosschevron-leftchevron-rightarrow-right