Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Multiple Outcomes for a Custom Field Reply To: Multiple Outcomes for a Custom Field

#19819
Gary
Participant

Thanks Tom. My bad. I changed condition=”equals” to condition=”is_contains” and it all worked. I am not sure why, but anyway it’s all good now. Thanks again. Gary

add_action( 'wpsp_after_title', function() {
    $meta = get_post_meta( get_the_ID(), 'geodir_dining_options', true );

    if ( $meta ) {
		echo do_shortcode( '[gd_post_badge key="dining_options" condition="is_contains" search="Dine-In" badge="Dine-In" bg_color="#7ccc66" txt_color="#000000"]' );
		echo do_shortcode( '[gd_post_badge key="dining_options" condition="is_contains" search="Take-Away" badge="Take-Away" bg_color="#1ca800" txt_color="#ffffff"]' );
		echo do_shortcode( '[gd_post_badge key="dining_options" condition="is_contains" search="Delivery" badge="Delivery" bg_color="#000000" txt_color="#ffffff"]' );
				    }
} );