Posted By

visualadvance on 11/07/11


Tagged


Versions (?)

Wordpress: Check for Custom Field Data


 / Published in: PHP
 

Check to see if there is data in a custom field

  1. <?php
  2. $key = 'video-embed';
  3. $themeta = get_post_meta ($post->ID, $key, TRUE);
  4. if($themeta != '') {
  5. meta('video-embed');
  6. } else
  7. {
  8. echo 'none found';
  9. }
  10. ?>

Report this snippet  

You need to login to post a comment.