Step 2: Make a copy of your A2PDefaultTemplate to edit.
Step 3: Go to your EPN panel and go to the link generator and make a link for a specific Item in your specific campaign. I like to break everything up into campaigns so I know when one of my sites is tanking.
You’ll end up with a link that looks like
Add this to your template where you’d otherwise have regular links.
If you have a template installed that uses synopsis plugins like limit-post.php you’ll likely need to edit the plugin because it strips out script tags. My template used limit-posts.php and all I had to edit was:
$content = strip_tags($content,'<a>'); to $content = strip_tags($content,'<a>,<script>');
So what kind of protection does this afford us? Let’s see.
- The url is never in complete form, so we don’t have to worry about regex matches.
- The URL doesn’t live in the <A> tag, so we don’t have to worry about scraping there.
- The url isn’t put together until the user clicks. Bonus.
Hopefully this will help against the most common bots running around ruining our days.