Skip Navigation

[Resolved] Restrict the relationship options to posts created by the current user

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

Problem:
Restrict the relationship options to posts created by the current user

Solution:
To limit the options that this selector will offer to posts created by the current visitor, just add the following attribute to your shortcode that lists the parent posts:

author="$current"

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/restrict-the-relationship-options-to-posts-created-by-the-current-user/#post-911030

Relevant Documentation:

This support ticket is created 6 years, 6 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by foguinho 6 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#911003

Tell us what you are trying to do? I created a post type named "Clientes", that can be created by users with the Corretor role. They can create another post type called Reservas. But I want that they can be aple to chose just the Clientes they created to associate to the Reservas they create too, and not with Clientes created by other users.

Is there any documentation that you are following? I couldn't find any documentation about this.

Is there a similar example that we can see? Nop.

What is the link to your site? Its on a localhost.

#911030

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - are we talking about the parent post select dropdown that is displayed with Toolset post form? If yes:

To limit the options that this selector will offer to posts created by the current visitor, just add the following attribute to your shortcode that lists the parent posts:

author="$current"

Once you add this attribute - it should display the parent posts with parent dropdown select box created by current user.

#911254

Thanks a lot, Minesh! Once the site is ready I will give you guys the access fr you to see how cool is what Toolset is helping me to do!