Posted By

mommygeekology on 01/17/11


Tagged

wordpress fields custom headwaytheme


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

aanoojgmailcom


Function to retrieve custom field values


 / Published in: PHP
 

URL: http://rentageekmom.com

  1. // Get custom field values for easy use later
  2. function get_custom_field_value($szKey, $bPrint = false) {
  3. global $post;
  4. $szValue = get_post_meta($post->ID, $szKey, true);
  5. if ( $bPrint == false ) return $szValue; else echo $szValue;
  6. }

Report this snippet  

You need to login to post a comment.