• Resolved kenzan_alex

    (@kenzan_alex)


    Hello,

    I’m trying to modify the email and twitter template, neither is working.

    Per example to modify the email template I used the example on :

    a2a_config.templates = {
        email: {
            subject: "Check this out: ${title}",
            body: "Click the link:\n${link}"
        }
    };

    Does anyone know the solution ?

    Thanks in advance,
    AL

    https://www.ads-software.com/plugins/add-to-any/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author micropat

    (@micropat)

    The JavaScript syntax to make both templates work is a little different than most AddToAny configurations at the moment. Here’s one way:

    a2a_config.templates = {
        email: {
            subject: "Check this out: ${title}",
            body: "Click the link:\n${link}"
        },
        twitter: "Check out ${title} ${link} by @AddToAny"
    };
    Thread Starter kenzan_alex

    (@kenzan_alex)

    I tried this and it’s still not working :/

    I put that code in : Settings > Addtoany > Additional Javascript.
    It’s like the plugin don’t take care about the code we can put there …

    The result it gives :
    – When I click on “Email” : the subject is the name of the page and the content is just the link of the page.
    – When I click on “Twitter” : the subject and the link are concatenated.

    Is there an other way to try the code ? Per example, could we put it in the functions.php of our theme ?

    Plugin Author micropat

    (@micropat)

    If it’s not working, that indicates a larger site issue.

    You can point to your site so folks here can take a quick look, or try the basic troubleshooting as suggested in the plugin’s 2nd FAQ to find the root cause.

    Thread Starter kenzan_alex

    (@kenzan_alex)

    Hum, I deactivated the plugin and reactivated it, and misteriously it works fine now :/ and without deactivated any other plugin..

    So thank you for your help, issue solved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Issue when modify the email/twitter template’ is closed to new replies.