Support › MB Relationships › Get posts with no relationship
I have a relationship set up between Posts and a CPT. I want to query for posts that don't have a connection. How can I do that?
This is an interesting question. Currently, we don't have a setting to get posts that don't have a connection. I suggest you try to create a custom code to do that:
1. Create an SQL query: get the post ID from the column from or to based on the relationship ID. You will have an array of posts that have a connection.
2. Create a WP Query and pass the array to the argument post__not_in. Read more about this argument in the documentation