Skip Navigation

[Résolu] how to remove a relationship in the Front-End for Connecting Posts

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.

Marqué : 

This topic contains 10 réponses, has 3 voix.

Last updated by OliverJ8211 Il y a 1 an et 3 mois.

Assigned support staff: Shane.

Auteur
Publications
#1594407
place.JPG
remove.JPG

Hi,

how can I remove a relationship in the front end?
I can reconnect it on the back end (see image).
A user with a custom role is able to add a relationship (see image) at the front end, but not remove it.

#1594833

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dido,

Thank you for getting in touch.

From your screenshot place.jpg i'm assuming that you are using a Many to Many relationship because your image is similar to a Relationship form.

In this case you won't be able to edit/delete the post relationships on the frontend as this can only be done on the backend. he relationship forms can only create new relationships but not modify existing one.

Please let me know if this clears things up for you a bit.

Thanks,
Shane

#1595687
partner.jpg

It is indeed a many-to-many relationship

This form (see my new image, I changed something) is on a partner page.
We made a custom role for partners. Each partner has his own page (and is also the author of his own page)
The partner can link a product (which he offers) to his page. He can't change "Jouw pagina".

It would be very inconvenient when he can't disconnect a product on the frontend. Any other ideas?

#1595783

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dido,

Thank you for the patience. I did some discussion with the team to see if this is possible and there is a way to do it.

If you take a look at our documentation below.
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

You are able to edit the relationships on the frontend and disconnect them, as well as delete the relationships from the frontend.

Please have a look at the documentation and let me know if it was able to help you with resolving this issue.

Thanks,
Shane

#1596019
remove.JPG

Thank you,

It works

#1596179

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dido,

Awesome, happy we were able to help resolve this issue for you.

If there are no further queries on this one you can go ahead and mark this ticket as resolved.

Thanks,
Shane

#1596185

hi Shane,

One more question... is there a possibility to make this (remove) conditional. That this is only visible on your own page as Partner?
I see it on all pages, although it works only on your own page. I tried some codes, but I did not succeed.

#1596199

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dido,

Actually yes you can do this to check if the current user is the author and only display the item based on that.


[wpv-conditional if="('[wpv-post-author format='meta' meta='id']' eq '[wpv-current-user format='meta' info='id']' ]

info goes here

[/wpv-conditional]

Please let me know if this helps.
Thanks,
Shane

#1596283

hi, it works,
but just a little typo:
[wpv-conditional if="('[wpv-post-author format='meta' meta='id']' eq '[wpv-current-user format='meta' info='id']' )"]

#1596313

My issue is resolved now. Thank you!

#1968571

Hi, I have this same question, but the link anchor no longer exists? Is there a new way to do this or a way to see the old fix?