managed wordpress hosting

Cloak Front End Email – WordPress Plugin


On 08-06-2015 wordpress

Over the last couple years I have had some clients who wanted or were accustomed to putting their email address straight on their website. Usually what I did for them in the past was I would write some custom Javascript to keep them from getting spammed.

So I had most of the code already written, and it was coming up quite often so I decided to just integrate the code I was writing for clients into a WordPress plugin for both personal use as well as putting it up on WordPress to let others use the code for whom ever wanted to display their straight email on their website.

I call it Cloak Front End Email. It’s a super simple plugin that you just install and activate and it just works. All you have to do is add the short code [email] inside your page, on your posts or inside a widget area and it will display your email that you have assigned in your General Settings of your WordPress admin console.

Functionailty

How it works is the short code generates html that looks like this:

<a href="#"><span class="cfe-jsemail">enable javascript</span></a>

Then I have Javascript making an ajax call to get your email from WordPress, after it grabs the email it injects the email into the span block as well as the mailto. Your email is never revealed and therefore any spammers scraping your website will not be able to harvest your email. It makes it super simple with an easy and safe way to display your email address on the front end of your website and not have to worry about getting put on spam lists.


Comments