Delete all relationships

Support MB Relationships Delete all relationships

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38014
    pzapza
    Participant

    I looked around but can't find it – excuse me if I'm missing something...

    The documentation shows a delete function

    This function deletes a specific relationship between 2 objects.

    But how can I remove all relationships (by relationship ID) from 1 object?

    #38015
    pzapza
    Participant

    For example if I have a relationship ID profiles_to_categories (post type profile to taxonomy category)

    And I want to clear any relationship (to a category) by a profile ID.

    #38019
    Long NguyenLong Nguyen
    Moderator

    Hi,

    With coding, you need to query get all objects (posts/terms/users) that are connected to a profile ID then put the delete function in the loop to delete them from the relationship.

    Or you can access your database, edit the table wp_mb_relationships and delete the relation rows manually.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.