CONTACT US: 1-800-622-4403
Domains To Datacenter Since 1994

Masking Your Email from Spammers with WordPress + PHP


If you are on WordPress, you can consider using the built-in antispambot() function to encode your email address. The function will encode the characters in your address to their HTML character entity (the letter a becomes a and the @ symbol becomes @) though they will render correctly in the browser.

<?php echo antispambot(""); ?>

This will result in the email address being displayed on your website in a readable format.

However, the bots that are trying to harvest email from your HTML source will see html codes that do not display as a readable email address.

How to Accomplish This

Here is one way to accomplish the above.
  1. Install the WordPress plugin "Shortcode EXEC PHP".  This will allow you to create your own custom shortcodes that contain PHP code.

  2. After installing Shortcode EXEC PHP, create your 5 PHP code snippet by navigating to tools >> Shortcode EXEC PHP in WordPress

  3. Enter the PHP code to use the built-in antispambot function

    echo antispambot("");

    Note: When using Shortcode EXEC PHP, you do not need to include the <?php beggining and ?> end tags.

  4. Name your new shortcode

    Example [myemailaddress]

  5. You can now edit the page where you would like the email address to appear --simply adding the shortcode [myemailaddress] to the page.
Your email address will now be visible on the page.

Buy SSL Certificates starting at $39

Buy Hosted Exchange - money back guarantee

Buy WordPress Hosting - money back guarantree

Buy Windows VPS Hosting - money back guarantree


  1. How To Install WordPress
  2. Hosting Multiple Domains on One IP Address (SuperAccount)
  3. How to modify CSS on Mobile Devices
  4. Change Your Domain Name using WordPress
  5. How to enable .NET 4.0 for your POA Account.
  6. How to remove Pages/Posts from Wordpress Search
  7. How to disable all Wordpress plugins using MySQL
  8. Remove index.php from Wordpress URL
  9. How to move a Drupal site from one host to another
  10. How to move a Wordpress site from one host to another
  11. How to change the Wordpress site URL
  12. Masking Your Email from Spammers with WordPress + PHP
  13. How to Redirect a Registered Domain
  14. Changing the Wordpress URL Path to web root "/" or another path
  15. Simple Way to Secure a WordPress Website
  16. How to restart your website in Control Panel.
  17. How to Block Referral SPAM from your Website
  18. Creating Campaigns in Google Analytics
  19. Switching over to a New InfoQuest account.
  20. Stopping your website through the customer control panel (POA).
  21. Deleting a domain from your account.
  22. Where do I go to view my web stats (AWStats) for my site?
  23. How to change Wordpress siteURL to IP address using phpmyadmin
  24. How to enable "anonymous access" to browse my site.
  25. How to access Wordpress files.
  26. How to add a dedicated/exclusive IP address to your account.
  27. How to upload website content to the server.
  28. Update Directory Path for Website.
  29. Password protecting a folder on your site on POA.
  30. Add Structured Data Location Schema to your website
  31. How to delete WordPress Comments using phpmyadmin
  32. How to password protect a specific directory on your POA Hosting Account.
  33. Adding A Domain To My Account. (POA)
  34. Using a Web.Config Redirect
  35. Using CDOSYS with POA accounts without authentication
  36. Permanent 301 redirect
  37. Using CDOSYS with POA accounts with authentication
  38. How to force https in WordPress using web.config
  39. How to force https in WordPress using htaccess

Feedback and Knowledge Base