Skip Navigation

[Resolved] Restrict Posts only related to current user

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

Problem: I would like to restrict some posts to specific Users, based on a custom field value.

Solution: Access offers restrictions based on post type or post group and User role, but nothing built-in based on custom field values per post. You can use conditional HTML output to restrict certain pieces of content instead.

Relevant Documentation:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

This support ticket is created 5 years, 12 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by mikeB-14 5 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1185145

Tell us what you are trying to do?
I have a CPT called planner event
In the post we have a field called ConsultantUserID ( this is the consultant who is doing the job for each event)
Consultants have a role in WP called Consultants

What I am trying do is look the ConsultantUserID and restrict access only to those planner Events, which match the logged userlogin.

#1185244

Just following up on our chat. Let me know if you need additional information, otherwise we can resolve this ticket. Thank you!

#1186817

My issue is resolved now. Thank you!