Hey there,
Just switched from magic fields to WP Types and to get things bulletproof I want to make sure if a field is empty, that there's still some content being displayed. In my case it's about defining an image...
The code I've previously been using to achieve this is:
<?php $values = get_post_custom_values("fieldname");
if (isset($values[0])) {
?>
<img src="<?php echo get('fieldname'); ?>" alt="<?php the_title(); ?>"/>
<?php }
else { ?>
<img src=""/>
<?php } ?>
Any idea how to achieve this with "types_render_field"? Can't get it to work with WP Types...
Thanks in advance!