Title: Subject parameter in shortcode?
Last modified: April 6, 2018

---

# Subject parameter in shortcode?

 *  Resolved [mad_griffith](https://wordpress.org/support/users/niccolomineo/)
 * (@niccolomineo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/subject-parameter-in-shortcode/)
 * Hi, I need to combine cloaking with the “mailto:” subject parameter. How to do
   it with this plugin’s shortcode?
 * Thank you.

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

 *  Plugin Author [webbernaut](https://wordpress.org/support/users/webbernaut/)
 * (@webbernaut)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/subject-parameter-in-shortcode/#post-10157440)
 * Great suggestion. Ive updated the code to give the option of a subject line in
   version 1.7, update the plugin and you can utilize a subject line.
 * Shortcode is as follows [email name=”cfe-example” subject=”My Email Subject Line”]
 *  Thread Starter [mad_griffith](https://wordpress.org/support/users/niccolomineo/)
 * (@niccolomineo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/subject-parameter-in-shortcode/#post-10157536)
 * Wow, you’re fast man! Thank you so much.
    What about adding support for all possible
   email fields?
    -  This reply was modified 8 years, 2 months ago by [mad_griffith](https://wordpress.org/support/users/niccolomineo/).
 *  Plugin Author [webbernaut](https://wordpress.org/support/users/webbernaut/)
 * (@webbernaut)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/subject-parameter-in-shortcode/#post-10157549)
 * I can put it on my todo list if other people suggest it, Im trying to keep the
   plugin pretty simple. The subject line option made a whole lot of sense as I 
   think some people would like that option. But the other email fields like body
   or cc, and bcc Im not sure that many people would use those. And if someone is
   trying to get that elaborate on their messaging system I feel an email form would
   be better than the mailto link.
 *  Thread Starter [mad_griffith](https://wordpress.org/support/users/niccolomineo/)
 * (@niccolomineo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/subject-parameter-in-shortcode/#post-10157573)
 * I think it depends on what you want to have on the page. My customer doesn’t 
   want a form, because they’d rather have an illustration with the mailto link.
 * Anyway, I was trying the shortcode within the following formula in Visual Composer(
   text field module):
 * `<a href="[email name=”cfe-example” subject=”My Email Subject Line”]" target="
   _blank">My <span style="color: yellow">Text</span></a>`
 * The shortcode is not being parsed correctly and in general it doesn’t seem to
   be compatible with that kind of situation.
 * There are other ways I can try of course, but I was wondering if something could
   be done from the plugin side.
    -  This reply was modified 8 years, 2 months ago by [mad_griffith](https://wordpress.org/support/users/niccolomineo/).
    -  This reply was modified 8 years, 2 months ago by [mad_griffith](https://wordpress.org/support/users/niccolomineo/).
 *  Plugin Author [webbernaut](https://wordpress.org/support/users/webbernaut/)
 * (@webbernaut)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/subject-parameter-in-shortcode/#post-10157593)
 * Text being [email]?
    So`<span style="color:yellow;">[email]</span>` ?
    -  This reply was modified 8 years, 2 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Plugin Author [webbernaut](https://wordpress.org/support/users/webbernaut/)
 * (@webbernaut)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/subject-parameter-in-shortcode/#post-10157608)
 * Sorry I think I figured out what you were doing.
    You can’t put the shortcode
   in the href. That’s not how shortcodes are intended. Shortcodes write code for
   you and in the case of this plugin, it’s not just returning an email address 
   it’s outputing a handful of code, so it wouldn’t work inside an html href.
 * I did wrap it in a span tag with yellow:
    `<span style="color:yellow;">[email]
   </span>` and since the span is not the parent tag of the mailto link `<a href
   ="mailto:email@sample.com">`, it is not being applied. It registers the website’s
   global css for all `<a>` tags, as it should being the cascade of how CSS works.
 * So at the moment there is no way to apply span styles outside some custom css
   in your style.css in your theme or the custom css module inside WordPress.
 * You can apply html elements like strong or em ect, but not style attributes.
 * Each email has a custom html class assigned to it so you could add css styles
   to your style sheet for each specific one (you would have to inspect the code
   in the browser to see what class is added, it’s dynamic so will depend on the
   email). Or you can set the global style using the following:
 * `.cfe-wrapper a {color:yellow;}`
 * PS I will put on my to do list on retaining span styles wrapping the short code.
    -  This reply was modified 8 years, 2 months ago by [webbernaut](https://wordpress.org/support/users/webbernaut/).
      Reason: code wrap
    -  This reply was modified 8 years, 2 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Thread Starter [mad_griffith](https://wordpress.org/support/users/niccolomineo/)
 * (@niccolomineo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/subject-parameter-in-shortcode/#post-10157611)
 * Sorry, I forgot to apply the code formatting. I meant this:
 * `<a href="[email name=”cfe-example” subject=”My Email Subject Line”]" target="
   _blank">My <span style="color: yellow">Text</span></a>`

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

The topic ‘Subject parameter in shortcode?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cloak-front-end-email_faf6e4.svg)
 * [Cloak Front End Email](https://wordpress.org/plugins/cloak-front-end-email/)
 * [Support Threads](https://wordpress.org/support/plugin/cloak-front-end-email/)
 * [Active Topics](https://wordpress.org/support/plugin/cloak-front-end-email/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cloak-front-end-email/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cloak-front-end-email/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [mad_griffith](https://wordpress.org/support/users/niccolomineo/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/subject-parameter-in-shortcode/#post-10157611)
 * Status: resolved