CMB2 Post Search Field displays/repeats initial post if left empty
Okay, I think that I’ve sorted this myself by looking again at the isset check. Instead of if ( ! empty( $connections ) ) { I’ve put: if ( isset( $connections[0][‘gwl_collection_item_name_connection_related_post’] ) ) { and so far this seems to be working. (I think the issue arises because the CMB2 group saves an empty array … Read more