I'm using wordpress CMS and CMB2 plugin for creating metaboxes and custom fields.So I'm trying to make on front end stuff like this:
IF my_custom_text_field have something inside(filled in) - then get this data, but if it is empty show some text. I'm using cmb2 custom metabox plugin to make custom metaboxes and fields. I have first part
<?php $seo_title = get_post_meta( get_the_ID(), 'seo_general_title', true ); echo esc_html( $seo_title );?>
but how to get my custom text if this field is empty i don't know.
there was topic with the same problem but it not works for me https://css-tricks.com/forums/topic/cmb2-display-group-field-meta-data-if-exists-if-empty-display-default-text/
Maybe someone can help? thanks.