Main post repeated if post seach field is left blank
liblogger opened this issue · comments
(I'm not sure if this is the right place to raise this, as it may just be me missing something rather than a bug in the code - apologies if so!)
I'm using CMB2 and this code to create a one-to-many link between posts, with the post search field in a repeatable group, so that each connected post has some text to provide context to the connection. I've got this working okay - except if a post doesn't have any connected posts. If the field/group is left empty, my post/page template repeats the main post content in place of the expected connected post.
(I've tried using !empty and isset checks - they haven't worked, but again, that may be me missing something obvious)