Adding ELSE to IF
Posted: Thu Oct 06, 2011 4:21 am
Hi everyone,
I'm struggling to add an else function to this (WordPress) code:
<?php if ( get_post_meta($post->ID, 'cat-ipad', true) ) : ?>
<img style="float:left;margin-left:5px;margin-top:14px;cursor:help;" title="iPad Application" src="<?php echo get_post_meta($post->ID, 'cat-ipad', true) ?>">
<?php endif; ?>
It's pulling a custom field 'cat-ipad' however I want to add an image that replaces else 'cat-ipad'
Any help would be hugely appreciated,
Nick
I'm struggling to add an else function to this (WordPress) code:
<?php if ( get_post_meta($post->ID, 'cat-ipad', true) ) : ?>
<img style="float:left;margin-left:5px;margin-top:14px;cursor:help;" title="iPad Application" src="<?php echo get_post_meta($post->ID, 'cat-ipad', true) ?>">
<?php endif; ?>
It's pulling a custom field 'cat-ipad' however I want to add an image that replaces else 'cat-ipad'
Any help would be hugely appreciated,
Nick