How to hide email address from spam bots in Oxygen?

Categories:
Tags:

WordPress has an excellent native anti-spam function that converts email addresses characters to HTML entities to block spam bots - antispambot() (read more about this function). We can easily apply this function in the Oxygen editor and the email address will be protected when displayed on the frontend!

Step 1

Instead of the email address, paste this shortcode into your text element:

[oxygen data='phpfunction' function='antispambot' arguments='john.doe@mysite.com']

Step 2

In the link settings, insert a shortcode of this type:

mailto:[oxygen data='phpfunction' function='antispambot' arguments='john.doe@mysite.com']

For example:

Converts email addresses characters to HTML entities to block spam bots in Oxygen

 

If you did everything correctly, then in the source code of the page the email address will now look like this:

encoded email address in Oxygen
Follow the release of new tips and tutorials:
arrow-up