show label text of select option rather than its value in cmb2
I’m using the $gas example variable from your question in my answer below. Sorry for the bad formatting, I’m typing this on my mobile device. If you’re certain that $gas will always contain a post ID then the simplest solution is to just do echo ! empty($gas) ? get_the_title( $gas ) : ”; (Ternary operator … Read more