Support

Account

Home Forums Front-end Issues Trying to add conditional display to blog-list Reply To: Trying to add conditional display to blog-list

  • ok, trying again. This doesn’t display empty buttons… but seems to not display anything at all.

    
    							$buttons = get_fields();
    							if( $buttons ) { 
    								echo
    									'<div class="et_pb_button_module_wrapper et_pb_button_3_tb_body_wrapper">';
    									foreach( $buttons as $but_name => $but_value ) {
    										if( !empty( $but_value ) ) { 
    											$but_label = get_field_object($but_name);
    											echo
    												'<a class="vendor-link" title="',$but_label['label'] ,'" href="', $but_value ,'">', $but_label['label'] ,'</a>';
    										}
    									}
    								echo
    									'</div>';
    							}
    

    Am I missing something obvious?