Created
May 10, 2013 18:11
-
-
Save JiveDig/5556270 to your computer and use it in GitHub Desktop.
Add phone number with click to call to header right hook in Genesis.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add phone number above nav, also add mobile menu | |
add_action( 'genesis_header_right', 'vp_call_us' ); | |
function vp_call_us() { | |
if(strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'mobile') || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'android')) { | |
echo '<div class="vp-call-us"><a href="tel:908-852-7028">Click to call! (908) 852-7028</a></div>'; | |
} else { | |
echo '<div class="vp-call-us">(908) 852-7028</div>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment