Home›Topic Tag: Controlling access to front-end content
Topic Tag: Controlling access to front-end content
Access plugin allows you to limit front-end read access to specific pages, posts or custom types and define who will be able to access that content. It also provides the functionality to set access control for specific blocks inside page content, in order to place texts that are visible to or hidden from certain user types.
When you ask for help or report issues, make sure to tell us on which content and user types you are trying to apply access control.
Viewing 15 topics - 136 through 150 (of 335 total)
Problem: I would like to use a conditional to show information to Users in a specific role "Manager". My site allows multiple roles, and [wpv-current-user info="role"] only returns the first role. So if the User's secondary role is Manager, this won't work in a conditional to test for the Manager role.
Solution: You can use Toolset's Access control shortcode to test if the current User has any role, including primary and secondary roles.
[toolset_access role="manager" operator="allow"]
I am a manager
[/toolset_access]
Problem: At one time it seemed that Access Groups were automatically applied to forum posts based on their parent forum post's Access Groups. Now that does not seem to be happening.
Solution: There has never been such an integration that I'm aware of. Access Groups must be added manually regardless of the forum parent post. Not sure how it happened before, but my guess is that someone else set the post group manually. This process is unfortunately unavoidable.
Problem: I would like to use Forms to allow Users to submit and edit posts. I would like to group Users by Company, and allow all Users from the same Company to read and edit all posts by all Users from the same Company.
Solution: Unfortunately there isn't a simple option that will allow you to create this type of filter. I think the simplest option is to add a custom field that holds a Company ID in the User profile, and add another custom field that holds the Company ID in each post. When each User submits content, the Company ID from their User profile could be used to set a custom field in the submitted post. Then you could filter a View by Company ID, and that would show each User content from other Users in their own Company.
Another more complex solution is to use a proxy custom post type that represents Users - something like "Employees". Each User is the post author of one Employee post. Then you can use post relationships to relate Employees and Companies. Then you can use Views post relationship filters to show and hide content based on which Company the Employee is related to. We have more information about using a proxy post type available here: https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/
See the first FAQ for more information about how you can limit each User to only one Employee post.
I want to create forms for creating and editing them, but I want to allow only specific WP roles ( Extended CPT Author) to be able to upload image to this CPT, others (Basic CPT Author) can not upload that , only able to set the CPT's Title and Content.
Solution:
I suggest you try with Access shortcode [toolset_access], check if current logged-in user has specific user role "Extended CPT Author", then display the show image upload option.