Follow us on Social Media

Nederlands NL English EN

⚠️ Important notification: Security updates

Due to recently discovered security vulnerabilities in PHP, we are performing necessary security updates.

Thanks to our additional security systems, which function independently of PHP, our servers, websites, and customer environments remain online and protected.

Please note: You may experience temporary problems within certain telephony environments.

We are closely monitoring the situation and keeping any inconvenience to a minimum.

Thank you for your understanding.

Why and How to Hide a Phone Number in WordPress!

A good contact page is crucial for your WordPress website, especially for customer communication. However, posting a phone number can lead to spam calls and spoofing, caused by bots that scrape numbers. Here’s how to protect your phone number without losing your reachability. Why hide your phone number? Spam calls and spoofing are becoming more and more common […] Read more

  • Online within 2 weeks
  • Free quote within 24 hours
  • Free stock photos
  • 100% satisfaction guarantee
  • Free quote within 24 hours
  • Free hosting (1st year)
  • Free domain name (1st year)
  • Aftercare and support
  • Including Google optimized texts

Request a no-obligation quote →

Why and How to Hide a Phone Number in WordPress!
Why and How to Hide a Phone Number in WordPress!
Why and How to Hide a Phone Number in WordPress!
Why and How to Hide a Phone Number in WordPress!
Why and How to Hide a Phone Number in WordPress!

A good contact page is crucial for your WordPress website, especially for customer communication. However, posting a phone number can lead to spam calls and spoofing, caused by number-scraping bots. Here you can read how you can protect your telephone number without losing your accessibility.

Why hide your phone number?

Spam calls and spoofing are increasingly becoming a problem. Companies want to remain reachable by telephone, but also want to be protected against such unwanted calls.

How to hide a phone number behind a button

Method #1: Using code

Adding a script to the functions.php file hides the number behind a button, making it less easy for spambots to scrape it. Human visitors can see the number by clicking the button.

Why and How to Hide a Phone Number in WordPress!

<?php function add_js_number_toggle() { ?> <script> function showNumber() { var btn = document.getElementById(“numberToggle”); if (btn.innerText === “Show number”) { var number = document.createElement(“SPAN”); var numberText = document.createTextNode(“+31 (0) 6 12 34 56 78”); number.id = “number”; number.appendChild(numberText); document.getElementById(“test”).appendChild(number); btn.innerText = “Hide number”; } else { document.getElementById(“number”).remove(); btn.innerText = “Show number”; } } </script> <?php } add_action('wp_head', 'add_js_number_toggle');

Method #2: Using a plugin

If you don't want to dig into the code, you can use the free Email Encoder plugin to protect phone numbers and email addresses.

And finally

Hiding a phone number behind a button significantly reduces the risk of spam calls and spoofing, although it is not a foolproof solution.

  • Less chance of spam calls.
  • Reduced chance of number spoofing.
  • Maintaining accessibility for human visitors.
  • No need for technical knowledge when using a plugin.
  • Improved security of contact information.

Would you like to know more about securing your WordPress website? Then check out our WordPress maintenance subscription.

 

Why and How to Hide a Phone Number in WordPress!

Are you ready to make your business shine online? Let us create your perfect website – with responsive design, SEO optimization, and an easy-to-use interface. Take advantage of free hosting, domain name and email in the first year. Don't wait any longer, make your online dream come true with Flexamedia. Get in touch today!

Other articles

WordPress deploys security update for Loginizer

WordPress Forced Rolls Out Security Update For Dangerous Bug In Popular Plugin The WordPress security team took a rare step last week and used a lesser-known internal capability to forcibly release a security update for a…

Read more

Why good communication with clients is crucial.

As a freelancer, clear communication with clients is essential. It sets clear expectations and prevents misunderstandings. Good communication is the foundation of every successful collaboration. It's the key to smooth projects and...

Read more