Prevent Skype Overwriting Phone Numbers In WordPress Themes

I didn’t know this was an actual problem until I read the advice on WPBeginner.com. Apparently, some WordPress themes can break when Skype changes a phone number into a number you can dial with Skype. The fix is a simple one liner that you add to the HEAD section of the theme. Personally, I don’t use Skype to call out and change my options to prevent the over riding phone numbers in the first place.


LIKE THIS

4

4 responses to “Prevent Skype Overwriting Phone Numbers In WordPress Themes”

  1. I would say that this is a perfect example of an opportunity to follow Otto’s example of putting code in a site-specific Plugin.

    I created a Gist for the very simple Plugin drop-in code:

    <?php
    /**
     * Stop Skype from hijacking phone numbers
     * 
     * Adds a META tag to the HTML document head, that 
     * prevents Skype from hijacking/over-writing phone
     * numbers displayed in the Theme.
     */
    function mysite_skype_meta() {
        ?>
        <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />
        <?php
    }
    add_action( 'wp_head', 'mysite_skype_meta' );
    ?>
    
  2. Forget the plugin. Here is a simple snippet you can add to your CSS file.

    span.skype_pnh_container {
    display:none !important;
    }
    span.skype_pnh_print_container {
    display:inline !important;
    }

    That’s it. No hacks, tricks, plugins, addons, or anything else.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Discover more from WP Tavern

Subscribe now to keep reading and get access to the full archive.

Continue reading