Hey @texasbiz – thank you a lot for your message, as well as for using our plugin! 🙂
Since you want to add a link, you can definitely use the [eeb_protect_content] as well. To demonstrate how it looks, I created a fully working phone link shortcode down below:
[eeb_protect_content]<a href=”tel:+14123815500″>Call Me</a>[/eeb_protect_content]
The snipped above will not only encode the phone number but also provides a clickable link for it.
In case you would like to learn more about the arguments that are available for the shortcode, we have a helpfile available within the plugin. To access it, please head over to your WordPress dashboard -> Email Encoder – and there at the top right of the page you will see a little button called Help – When you click on it, you will see some tabs, which one of them is Shortcodes – There you will also see further details.
Alternatively, you can also check out our online documentation: https://ironikus.com/docs/article-categories/eeb-get-started/
In regards to your question about the template function, here is the definition of it within our plugin for reference:
function eeb_protect_content( $content, $method = null, $protection_text = null )
In case you have any further questions, feel free to let me know at any time. 🙂
Thank you very much for your detailed response!
In my case will have to be at template level, shortcodes are not an option for users.
I did read through your documentation but must have overlooked the template function. So all I need to do is add this to my child theme functions.php and phone numbers will automatically be protected?
Thank again.
Sorry, guess my question is out of line?
Is it possible to give example that goes into functions.php ?
In regards to your question about the template function, here is the definition of it within our plugin for reference:
function eeb_protect_content( $content, $method = null, $protection_text = null )
Cannot seem to get working at template level.
If asking too much, please just state and I will look else where for solution 🙂 Totally understand the plugin is free and so is support.
In any case, I appreciate the plugin and help.
-
This reply was modified 5 years, 9 months ago by
Terry J.
Hey @texasbiz – Thank you for your answer, as well as the additional details. 🙂
I’m not sure if my assumption is right, but it looks like you want to encode a complete template and not only a simple text string, correct?
We do not have a code available that you can simply paste to your functions.php file since it depends on the plugin and how you want to encode it exactly, but I can offer you an example you can use the template function within a template itself:
<?php
if (function_exists('eeb_protect_content')) {
echo eeb_protect_content('+12 345 678');
}
?>
What this code does: It encodes the phone number +12 345 678 and outputs it.
If you paste that snippet within the template on the position you would like to encode the content, it will be displayed in a protected way.
If you have any further questions, please let me know. 🙂