Support » Theme: JustWrite » Twitter share button share only title.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You have to add twitter cards to you header (Like Open Graph for Facebook).
    There are some plugins you can use to do this.

    Theme Author acosmin


    I think you have your answer above 🙂

    Still dont work :/ I tried with the plugin above and with seo by yoast.

    Theme Author acosmin


    I don’t understand your original question.

    If the script doesn’t work as you want I recommend you use JetPack or any other social sharing plugins.

    More info on tweet buttons you can find here:

    The question is the tweet button from theme dont work.It shares only the title not the permanlink.

    fixed.I created a tweet button from tweeter and changed this`<!– Tweet This –>
    <span class=”tweet-this”>
    <a href=”<?php echo $tweet_url; ?>” class=”twitter-share-button” data-url=”=<?php the_permalink(); ?>” data-via=”<?php echo of_get_option( ‘ac_twitter_username’ ); ?>” data-lang=”en” data-related=”anywhereTheJavascriptAPI” data-count=”vertical”>Tweet</a>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);;js.src=””;fjs.parentNode.insertBefore(js,fjs);}}(document,”script”,”twitter-wjs”);</script>

    @dori_92 Thanks so much, it looks like this should work, but it didn’t for me. Will keep looking for the reason to this problem and post the answer.

    Ok, here is the code that worked for me, it’s simpler and so far, I haven’t found a weakness, but yet again, I don’t know what I’m doing. I replaced some code in the very standard twitter share button to include the username as a function and not hard-coded, as some examples of the code ask you to fill it in manually.

    Full disclosure, I don’t fully comprehend the js portion at the end of @dori92‘s code and I am using a simplified version, so please keep this in mind if there is something special reason to include that part.

    Here it is:
    <a href="<?php echo urlencode(wp_get_shortlink()); ?>&counturl=<?php urlencode(the_permalink()); ?>" class="twitter-share-button" data-count="vertical" data-via="<?php echo of_get_option( 'ac_twitter_username' ); ?>">Tweet</a><script type="text/javascript" src=""></script>

    Remember to keep the span tags before and after this code, as in the standard code on justwrite’s documentation.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Twitter share button share only title.’ is closed to new replies.