Custom Fields
Re-Envisioned
Support Meta Box Conditional Logic MetaBox doesn't saves and it doesn't work with selected category Reply To: MetaBox doesn't saves and it doesn't work with selected category

#9366

Anh Tran
Keymaster

I think it’s better to check like this:

$birra = isset( $passaggio['et2018-nome_birra'] ) ? $passaggio['et2018-nome_birra'] : '';

So the variable is always available and won’t display any warning if you do echo $birra;.

PS: You can get the group value your way or use the helper function like this:

$passaggio = rwmb_meta( 'gruppo_birra' );

In your code, please make sure the global $post is available. Otherwise it won’t work. You can try this instead:

$passaggio = get_post_meta( get_the_ID(), 'gruppo_birra', true );