Guest User

Untitled

a guest
Sep 11th, 2015
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Additon by gal
  2. global $post;
  3. $pid = $post->ID; //get current post id
  4. $phoneNumber = get_post_meta($pid, 'header_phone_number', true);
  5. $cat_id = get_query_var('cat');
  6.  
  7. if ($phoneNumber=='') {
  8. echo $cat_id;
  9. $phoneNumber= get_option( "category_header_phone_".$cat_id);
  10. }
RAW Paste Data