Thanks for the details, I have checked it again in your website, you are using many-to-many relationship "cbookmark", which is different from what you mentioned above:
https://toolset.com/forums/topic/select-the-parent-and-child-when-creating-a-relationship/#post-1362897
This is a one to many relationship.
You can check the relationship settings in your website:
hidden link
So it is different, and needs custom codes, I have done below modifications in your website:
1) Dashboard-> Toolset-> Settings-> Custom codes, create a new snippet "check-relationship", withe below codes:
add_shortcode('check-relationship', function($atts, $content){
$seekers_id = get_the_ID();
$cp_providers_id = 0;
if(isset($_GET['post_ids'])){
$cp_providers_id = $_GET['post_ids'];
}
$res = 0;
$query = new WP_Query(
array(
'post_type' => 'cp-provider',
'posts_per_page' => -1,
//new toolset_relationships query argument
'toolset_relationships' => array(
'role' => 'child',
'related_to' => $seekers_id,
// this will work only with relationships that have existed before the migration
// if possible, use the relationship slug instead of an array
'relationship' => 'cbookmark'
),
'fields' => 'ids',
)
);
$ids = $query->posts;
if(in_array($cp_providers_id, $ids)){
$res = 1;
}
return $res;
});
It will create a new custom shortcode [check-relationship]
2) Dashboard-> Toolset-> Settings-> front-end-content
in section "Third-party shortcode arguments", add above shortcode name: check-relationship
3) Edit the post view "view-bmk-seek-connect-3":
hidden link
in section "Loop item in view-bmk-seek-connect-3", change the codes as below:
[wpv-conditional if="( '[check-relationship]' eq 1 )"]
relationship exist
[/wpv-conditional]
[wpv-conditional if="( '[check-relationship]' eq '1' )" evaluate="false"]
relationship does not exist
[/wpv-conditional]
Please test again, check if it is what you want.
More help:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-shortcodes-in-conditions/