Skip Navigation

[Resolved] User delete relationships at front end

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

Author
Posts
#2536433

I have a one(Product) to many(Work) relationship.
On the Product page I have created form on front end allowing user to connect their works, also displaying related work at the same page.
Now users would need to disconnect the relationship, either via a delete link, or via another form, how do I do that?
Example page is here
hidden link

I've looking at this thread however feels very confusing.
https://toolset.com/forums/topic/front-end-editing-of-post-relationships/

Thank you.

#2536895

Hi,

Thank you for contacting us and I'd be happy to assist.

To delete a post-relationship, you can use the "cred-delete-relationship" shortcode, inside the loop of the view, that shows the related posts, in the template for the single "Product" pages:
https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred-delete-relationship

Example:


[cred-delete-relationship role_items='$fromViews' relationship='relationship-slug' redirect='self']Delete this relationship[/cred-delete-relationship]

Note: You'll replace the 'relationship-slug' with the actual slug of the relationship in use.

I hope this helps and please let me know if you need further assistance.

regards,
Waqar