Skip Navigation

[Resolved] Remove connection between user post relationship

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 3 replies, has 2 voices.

Last updated by Paul 1 year, 5 months ago.

Assisted by: Minesh.

Author
Posts
#2461967

Hi there, wondered if you could help?

I have a content template linked with an Edit User CRED form.
On this same content template I have a Relationship form which connects a related User CPT to another one.
Connecting the user works fine however, I want to have a "Disconnect User" link on there which will remove the connection between two posts.

I have tried every combination of the below, even in a View which filters only the relevant related User posts but none of them are showing:

[wpv-view name="admin-disconnect-user"]
                    [cred-relationship-form-link form='disconnect-user' child_item='[wpv-post-author format="meta" meta="ID"]']
               [cred-delete-relationship related_item_one="[wpv-post-author format="meta" meta="ID"]" related_item_two="$current"]Delete relationship[/cred-delete-relationship]
          [cred-delete-relationship role_items='$fromViews' relationship='school-teacher' redirect='self']Disconnect[/cred-delete-relationship]
#2461991

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

As I understand, you added the delete relationship shortcode in the content template - Correct? If yes:
- I would like to know that what post relationship you created between user post type and another post type. Is it one-to-one, one-to-many?

Can you pass me all this required information as well as problem URL and admin access details. Once I'll review your setup I will be able to guide you in the right direction.

#2462013

Minesh
Supporter

Languages: English (English )

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

Could you please try to use the following shortcode to disconnect the relationship:

[cred-delete-relationship related_item_one='[wpv-post-id item="@school-teacher.parent"]' related_item_two="[wpv-post-id]" relationship='school-teacher' redirect='self']Disconnect[/cred-delete-relationship]

Does that helps?

More info:
- https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred-delete-relationship

#2462033

So many thanks for your help. Hope you have a spendid day!!

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.