Types: empty field

If custom field type is empty or has a value.

If “varighed” has a value, display. Otherwise don’t. Code snippet #1

<?php if(types_render_field('varighed', array('raw'=>'true'))){?>
<?php echo '<p class="freelance-jobmeta-type">Varighed:</p><p class="freelance-jobmeta-data">'.types_render_field("varighed", array("output"=>"HTML")); ?></p>
<?php }?>

Code snippet #2

<?php if(types_render_field('fw_product_wine_appellation', array('raw'=>'true'))){?>
<dt class="productLabel"><?php echo __( 'Appellation:', 'formulawino' ); ?></dt><dd class="productDescription"><?php echo(types_render_field('fw_product_wine_appellation', array('class'=>''))); ?></dd>
<?php }?>

If value display

<?php if(types_render_field('methods-tools-download-box-form', array('raw'=>'true'))){?>
<div class="methodsToolsFree"><?php echo "Free download included"; ?></div><?php }?>

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *