I am using a shortcode to remove a relationship in my frontend which works on all other pages on my website:
[cred-delete-relationship role_items='$fromViews' relationship='project-company' class='smalltext' redirect='self']remove[/cred-delete-relationship]
only on this specific page where I am connecting a project with a company through an Intermediary post type with a custom field that holds the specific type of relationship between company and project (f.ex.: client, agency, etc) the shortcode does nothing.
I have double checked all elements several times and cannot figure out why this is not working?
thx for your help.
Hi Tobias,
Thank you for contacting us and I'd be happy to assist.
If the same shortcode is working at other places, it means that it is correct and it's only a matter of current post's scope, where it doesn't work.
For most efficient troubleshooting, it would help if I could get the clone/snapshot of your website, to test this on my own server.
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )
I've set your next reply as private and please include exact details about where this shortcode is working and where it isn't.
regards,
Waqar
Hi Tobias,
Thank you for sharing the admin access.
Your observation was correct and in the "Projects" post template, I noticed that the "cred-delete-relationship" shortcode was being used inside the view "PROJECTS - List Clients - View", that loops through the "Projects Companies Intermediary Posts".
Since in this view, the information about the actual participant post types is not available, that shortcode isn't working.
In this case, a better option would be to use "cred_delete_post_link" shortcode to delete the current intermediary post from the loop.
( ref: https://toolset.com/documentation/user-guides/front-end-forms/cred-shortcodes/#cred_delete_post_link )
For example:
[cred_delete_post_link action='delete' message_show='0' class='cred-refresh-after-delete']Remove[/cred_delete_post_link]
When an intermediary post is deleted ( not trashed ), it's corresponding relationship is also removed.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Thx Waqar, works perfectly!!! My issue is resolved now. Thank you!