• I’d like to let my client add a call-out quote to the home page — sometimes they will want it and sometimes they won’t. I created a custom field called “call-out” where the client can add text. Then I put some php in my template like this:

    <?php  if(get_post_meta($post->ID, 'call-out', true)) { ?>
      <p class="call-out"><?php echo get_post_meta($post->ID, 'call-out', true); ?></p>
    <?php }; ?>

    What if they want not to have a call-out? If they delete the custom field, it’s gone and they will need to create a new custom field in the future. Is there a better way?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Removing custom field data from a page’ is closed to new replies.