WordPress Tagline Click-to-Call

by | Mar 31, 2015 | Web Developer

This WordPress Tagline Click-to-Call Code Snippet will enable the ability to use HTML tags, with the WordPress Tagline Field, in Genesis Framework Child Themes and other WordPress Themes. Use of the WordPress Tagline Click-to-Call Code Snippet comes in handy, especially for users of OS X Yosemite, as it will allow them to “Click-to-Call” instead of going through the process of selecting the phone number on the webpage, clicking the pop-up menu and then choosing which iPhone to use to make the call.

PHP Code Snippet – Genesis Framework

Copy/Paste the PHP code below, to the Genesis Framework, Child Theme functions.php file:

[php]
//* Bamajr included WordPress Tagline Click-to-Call
remove_action( ‘genesis_site_description’, ‘genesis_seo_site_description’ );

add_action( ‘genesis_site_description’, ‘bamajr_seo_site_description’ );
function bamajr_seo_site_description() {

echo html_entity_decode(get_bloginfo(‘description’));

}
[/php]

PHP Code Snippet – other WordPress Themes

Copy/Paste the PHP code below, to the active WordPress Theme header template:

Locate:

[php]
bloginfo(‘description’)
[/php]

…and replace it with:

[php]
echo html_entity_decode(get_bloginfo(‘description’))
[/php]

WordPress Tagline Click-to-Call HTML Example

Copy/Paste the HTML code below, to the WordPress Tagline Field (Settings > General > Tagline):

[html]
<a title="(###) ###-####" href="tel:+1##########">(###) ###-####</a> Additional – Tagline – Text – Here
[/html]

WordPress Tagline Click-to-Call – More Info

  1. NOTABLE ITEMS:
    • The “bamajr” in bamajr_seo_site_description does NOT have to remain. Simply replace “bamajr” with an identifier of your choice. HINT: there are two places this would need changed.
  2. DISCLAIMER: Code Snippets are not posted until they have been tested and verified to work. In most cases, the Code Snippets are in use on this website or a client’s websites. However, all Code Snippets come without any warranty of functionality.
Logo with image

About the Author:

WebDevRobert

Innovative Technology Professional, working on IT/OT Convergence & Security, in the foundry industry.

Website Designer/Developer since the mid 1990’s.

Apple, Linux and Network Administrator since the late 1990’s.

Background includes several years of IT/OT and IIoT Administration, Communications Infrastructure Design and Project Management.

Currently the VP of Technology for Oil City Iron Works, Inc., in Corsicana, TX.

Subscribe for Updates:

This field is for validation purposes and should be left unchanged.
This field is hidden when viewing the form

Next Steps: Sync an Email Add-On

To get the most out of your form, we suggest that you sync this form with an email add-on. To learn more about your email add-on options, visit the following page (https://www.gravityforms.com/the-8-best-email-plugins-for-wordpress-in-2020/). Important: Delete this tip before you publish the form.
Name(Required)
Email(Required)