Support

Account

Home Forums Front-end Issues Hide Div if custom fields are empty Reply To: Hide Div if custom fields are empty

  • I have a similar situation. I am trying to display product specifications and details. I have a few blocks created but not every page requires all blocks to be filled out, thus the empty blocks (div) still show up. How can I add a logic to hide the div (frontend: class/borders) if there’s no custom field value entered.

     <div class="info-dtl-box" id="additional">
    		<h4><?php echo $title_additional_block_1; ?></h4>
    		<ul>
    
    		          <li><?php echo $description_additional_block_1; ?></li>
    
    		</ul>
    			  </div>