If Page Content Exists
-
So basically I want to show the page content if it exists, and if not use a preformed “demo” page that I have set in the template page its using.
So something like this below, only so that it shows the page content not custom field content:
<?php $image=get_post_meta($post->ID, 'webimg', true); ?>
<?php if ( $image ) : ?>
<img src="<?php echo $image; ?>" alt="">
<?php else : ?>
<p> No Image Exists. </p>
<?php endif; ?>
Thanks in advance!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘If Page Content Exists’ is closed to new replies.