Yang that worked perfectly.
I am trying to delete the relationship using this code :
[cred-delete-relationship role_items='$fromViews' relationship='cbookmark' redirect='self']Delete this relationship[/cred-delete-relationship]
It does not show the delete button. I have updated the access control seekers, authors and cbookmarks but still not showing.
The above code has been placed with the post view "view-bmk-seek-connect-3":
As this finds both the posts and checks if the relationship exists.
Hello,
You can follow our document to setup the "delete relationship link":
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/editing-existing-connections-between-related-posts/#deleting-existing-connections-between-posts
section "Deleting existing connections between posts".
In your case, it needs a child post view:
- Query "cp-Providers" posts
- Filter by post type relationship between "Seekers" and "cp-Providers"
- And display the "delete relationship link" shortcode
Hi Yang
I have created a new view: "cp-prov-find-relationship-view"
Still not finding the record - I have attached the view.
The view is used with in the "care-seeker-provider-view" page
Thanks for the details, I am checking it in your website, will update here if there is anything found
I have done below modifications in your website:
1) Edit the post view "view-bmk-seek-connect-3"
hidden link
in section "Loop item in view-bmk-seek-connect-3", line 3, replace this codes from:
[cred-delete-relationship role_items='$fromViews' relationship='cbookmark' redirect='self']Delete this relationship[/cred-delete-relationship]
To view's shortcode:
[wpv-view name="cp-prov-find-relationship-view"]
So view "cp-prov-find-relationship-view" will act as child view of "view-bmk-seek-connect-3"
2) Edit post view "cp-prov-find-relationship-view":
hidden link
in section "Loop item in cp-prov-find-relationship-view", line 2, replace this codes from:
[cred-delete-relationship role_items='$fromViews' relationship='cbookmark' redirect='self']Delete this relationship[/cred-delete-relationship]
To:
[cred_delete_post_link action='delete' post='[wpv-post-id item="@cbookmark.intermediary"]' message='Are you sure you want to delete this post?' message_show='1' class='cred-refresh-after-delete']Delete this relationship[/cred_delete_post_link]
After user click delete link, it will delete the intermediate post, so delete the post type relationship too.
Please test it again, check it is fixed, thanks
My issue is resolved now. Thank you!