Tell us what you are trying to do? I am trying to limit access to relationship form
Is there any documentation that you are following? could not find any related document
Is there a similar example that we can see?
1) I have 2 post types (a) Product (b) Certification Program
2) I have Many-to-Many relationship between the 2 mentioned post types i.e. a product can be part of multiple certification programs and a certification program can have multiple products
3) I am able to restrict access to "product edit form" and "certification program edit form" in Toolset access control to authors of the corresponding post
4) I have a relationship form created to capture additional fields when associating a product to certification program. ISSUE: I want to restrict access to this relationship form only to either author of the product post or certification program post. I could not find a configuration in access control to add this restriction.
Hello. Thank you for contacting the Toolset support.
With Relationship Forms, the only Acess settings available is to grant access to Media library and you can find it at:
=> Toolset => Access Control => Toolset Forms tab => Relationship Forms Frontend Access
There is no native way available to set access restrictions for post author using access settings.
You can display the conditional content based on post author equal to loggedin user using the following code:
[wpv-conditional if="( '[wpv-current-user info="ID"]' eq '[wpv-post-author format="meta" meta="ID"]' ) "]
// add your relationship form here.
[/wpv-conditional]
I added the conditional code you shared in the elemental single page where this relationship form is placed. It is not working.
Attached are 2 screenshots
(1) original shortcode to display the relationship form - which always displays the form
(2) updated shortcode (based on the code you shared) - the form is not displayed though the current user and the post author are same. (Note: I have checked the above in preview mode as well - though the screenshot is not of the preview mode)
Let me know if I am placing the code in the wrong place.
I see you are using Elementor. The code I shared is to check if the current post author is equal to logged-in users and as far as I can see that is what you wanted. Please let me know if this is not correct.
I see you are using the shortcode widget where you added the code I shared and that is correct. You should try to save the template and check on frontend and let me know if it works as expected. If it does not work, I need wp-admin access details so I can look at it.
I have set the next reply to private which means only you and I have access to it.
response to your questions in earlier message:
The code I shared is to check if the current post author is equal to logged-in users and as far as I can see that is what you wanted. Please let me know if this is not correct. --> this is correct
I see you are using the shortcode widget where you added the code I shared and that is correct. --> Thanks for confirming.
You should try to save the template and check on frontend and let me know if it works as expected. --> I did and still it did not work
If it does not work, I need wp-admin access details so I can look at it.
I have set the next reply to private which means only you and I have access to it. --> I am currently moving my website to different host, so will be able to share the info next week.