i have two custom posty type, A and B. They are in a relationship One (A) to Many (B). When i delete the post A, i want that also all the post B that are in relationship will be deleted.
Hello,
i have discover that when i delete the post A, in my case "Intervento", other relationship with it will get broken.
Let me explain better A is in relationship with B, C, D... now the function you give me work like a charm... post B will be deleted great.
But post C, that was in relationship with A, now can't anymore be related to A.
Please elaborate the questions with more details:
other relationship with it will get broken.
Which one is the other relationship?
How did see it is broken?
The custom codes mentioned in: hidden link
Should be able to delete all child "chapter" posts related with the same "book" post on same relationship "book-chapter"
Hello,
let me explain better: i have my post A (parent) that is in relation with B (child). A is also in relation with other post C,D,E.
When i delete the post A, also post B will be deleted and that sounds great. Now i have problem with the post C,D,E that were related to A that was canceled. I can't assign anymore to any post A.
In my specific case i have post A (job), post B (work) and for example post C (worker). When i delete the "job", my "worker" relationship with "job" will be delete. Now if i want assign the "worker" to another "job" i can't anymore!
The problem you mentioned above is abnormal, after delete post A (job), all relationships related with post A should be deleted, you should be able to setup post C (worker) with other job posts without any problem.
Please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here: https://toolset.com/account/downloads/
2) In case it is a compatibility problem, please deactivate all other plugins, and switch to WordPress default theme 2021, deactivate all custom PHP/JS code snippets, and test again
No, I have tried it in my localhost with a fresh WP installation, after delete the parent post with shortcode:
[cred-delete-post action='delete' onsuccess='self']Delete[/cred-delete-post]
Edit the child post again, I can connect it with other parent posts without any problem