Title: Using CryptX in Template
Last modified: August 20, 2016

---

# Using CryptX in Template

 *  [visualcraftsman](https://wordpress.org/support/users/visualcraftsman/)
 * (@visualcraftsman)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/using-cryptx-in-template/)
 * I just installed CryptX 3.1.2 and pasted the php code into my footer.php template
   file to replace a mailto anchor. I changed the variable names where applicable
   and updated my css file for the class name, but after I tested the php file the
   anchor for the mailto link doesn’t show up at all. Here’s the php code I used
   replacing the old mailto link…
 *     ```
       <?php
       $mail="info@visualcraftsman.com";
       $text="Email Us";
       $css ="footEmail";
       if (function_exists('cryptx')) {
       cryptx($mail, $text, $css, 1);
       } else {
       echo sprintf('<a href="mailto:%s" class="%s">%s</a>', $mail, $css, ($text != "" ? $text : $mail));
       }
       ?>
       ```
   
 * [http://wordpress.org/extend/plugins/cryptx/](http://wordpress.org/extend/plugins/cryptx/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [visualcraftsman](https://wordpress.org/support/users/visualcraftsman/)
 * (@visualcraftsman)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/using-cryptx-in-template/#post-2481947)
 * Okay, found the issue. But, can I switch the css class to an id by just changing“
   class” to “id” in the code above?
 *  Thread Starter [visualcraftsman](https://wordpress.org/support/users/visualcraftsman/)
 * (@visualcraftsman)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/using-cryptx-in-template/#post-2482085)
 * Well, I edited cryptx.php and changed “class” to “id” in the function for the
   template stuff. Seems to work great now. Only thing is, whenever the plugin gets
   updated it’ll probably wipe out my changes.
 * So would be grrreat if both class and id was supported in the anchor 🙂 cough,
   cough.
 *  Plugin Author [Ralf Weber](https://wordpress.org/support/users/d3395/)
 * (@d3395)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/using-cryptx-in-template/#post-2482120)
 * Hi visualcraftsman,
 * thank you for your hints and improvements.
 * I will add this to the next version of CryptX, so i will support both id and 
   class configurable in the backend and at the template function.
 * Will this be ok for you?
 * Kind regards
    Ralf
 *  Thread Starter [visualcraftsman](https://wordpress.org/support/users/visualcraftsman/)
 * (@visualcraftsman)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/using-cryptx-in-template/#post-2482121)
 * That would be great Ralf! Thank you for considering it and for making a really
   cool plugin.
    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Using CryptX in Template’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cryptx.svg)
 * [CryptX](https://wordpress.org/plugins/cryptx/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cryptx/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cryptx/)
 * [Active Topics](https://wordpress.org/support/plugin/cryptx/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cryptx/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cryptx/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [visualcraftsman](https://wordpress.org/support/users/visualcraftsman/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/using-cryptx-in-template/#post-2482121)
 * Status: not resolved