• Resolved mad_griffith

    (@niccolomineo)


    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

    (@webbernaut)

    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

    (@niccolomineo)

    Wow, you’re fast man! Thank you so much.
    What about adding support for all possible email fields?

    • This reply was modified 6 years, 7 months ago by mad_griffith.
    Plugin Author webbernaut

    (@webbernaut)

    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

    (@niccolomineo)

    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 6 years, 7 months ago by mad_griffith.
    • This reply was modified 6 years, 7 months ago by mad_griffith.
    Plugin Author webbernaut

    (@webbernaut)

    Text being [email]?
    So<span style="color:yellow;">[email]</span> ?

    Plugin Author webbernaut

    (@webbernaut)

    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 protected]">, 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.

    Thread Starter mad_griffith

    (@niccolomineo)

    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.