Guest User

Untitled

a guest
Sep 11th, 2015
70
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. global $post;
  2. $pid = $post->ID; //get current post id
  3. $phoneNumber = get_post_meta($pid, 'header_phone_number', true);
  4. $cat_id = get_query_var('cat');
  5.  
  6. if ($phoneNumber=='') {
  7. //echo $cat_id;
  8. $phoneNumber= get_option( "category_header_phone_".$cat_id);
  9. }
  10.  
  11. if ($phoneNumber=='')
  12. $phoneNumber = '
  13. <div style="float: left; font-family: BebasNeueRegular,Verdana,Arial,sans-serif; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
  14. <table width="525px" style="margin-top:-20px;"><tbody>
  15. <tr>
  16. <td style="text-align:center;font-size:35px;font-weight:bold; padding-top:0px; height:40px; color:#FF6302;">
  17. <a href="tel:(646)801-5625">(516) 263-7770&rlm; </a>
  18. </td>
  19. </tr>
  20. <tr>
  21. <td style="text-align:center;font-size:35px;font-weight:bold; padding-top:0px; height:40px; color:#FF6302;">
  22. <a href="tel:(646)801-5625">(646) 801-5625 </a>
  23. <p style="font-size:26px;font-weight:bold">&nbsp;LOCKSMITH &amp; ADVANCED SECURITY</p>
  24. </td>
  25. </tr>
  26. </tbody></table></div>
  27. ';
  28.  
  29. else
  30. $phoneNumber = '
  31. <div style="float: left; font-family: BebasNeueRegular,Verdana,Arial,sans-serif; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
  32. <table width="525px" style="margin-top:-20px;"><tbody>
  33. <tr>
  34. <td style="text-align:center;font-size:35px;font-weight:bold; padding-top:0px; height:40px; color:#FF6302;">
  35. <a href="tel:'.$phoneNumber.'">'.$phoneNumber.'</a> <br>
  36. <p style="font-size:26px;font-weight:bold">&nbsp;LOCKSMITH &amp; ADVANCED SECURITY</p>
  37. </td>
  38. </tr>
  39. </tbody></table></div>';
  40.  
  41.  
  42. ?>
RAW Paste Data