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.

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. Chip,

    I actually thought about creating a simple plugin and submit it to the repository… But most theme devs would like to have the snippet rather than activating a snippet.

    But I will submit this as a plugin to the repository now…

  3. 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.

Newsletter

Subscribe Via Email

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

%d bloggers like this: