Dealing with < in tw:counturl addthis plugin

前端 未结 2 1737
梦毁少年i
梦毁少年i 2021-01-07 03:29

I have an addthis plugin for displaying total number of tweets in my blogspot blog. I use it this way If i mention tw:counturl=\"my_specific_blogger_url\" > it shows the e

相关标签:
2条回答
  • 2021-01-07 04:18

    Ok I found the answer to it. You have to add a javascript code to handle it.

    var tweet_button = document.getElementById(&#39;addthis_button_tweet&#39;);
    tweet_button.setAttribute(&#39;tw:counturl&#39;, <data:blog.url/>);
    
    0 讨论(0)
  • 2021-01-07 04:20

    This should work, you just need to add "expr" before tw:counturl. I was able to get it working on my Blogger site with the following:

    <a class='addthis_button_tweet' expr:tw:counturl='data:blog.url'/>
    

    This needs to be entered into the template itself Template -> Edit HTML -> Proceed.

    I hope this works for you.

    0 讨论(0)
提交回复
热议问题