Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPBカップ
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPressでTwitterのシェアとリツイートボタンを追加する方法

編集メモ: WPBeginner のパートナーリンクから手数料を得ています。手数料は編集者の意見や評価に影響を与えません。編集プロセスについて詳しく知る。

WordPressサイトにTwitterのシェアボタンやリツイートボタンを追加したいですか?

投稿やページにソーシャルボタンを追加することは、読者にコンテンツのシェアやリツイートを促す素晴らしい方法です。これは、より多くのフォロワー、エンゲージメント、訪問者を得ることができます。

この投稿では、WordPressにTwitterのシェアボタンとリツイートボタンを追加する方法を紹介します。

How to add Twitter share and retweet button in WordPress

なぜWordPressにTwitterのシェアボタンとリツイートボタンを追加するのか?

当社のマーケティング統計調査によると、Twitterの月間有効ユーザー数は2億1700万人を超えています。あなたのサイトを宣伝するには絶好の場所です。

しかし、 ソーシャルメディアでコンテンツをシェアしても、すでにあなたのアカウントをフォローしているユーザーにしか届きません。新しいオーディエンスにリーチしたいのであれば、あなたのコンテンツをシェアしたりリツイートしてもらう必要がある。

An example of a Twitter share button, embedded in WordPress

これは、あなたのサイトを知らなかったかもしれない人々にあなたのブランドを紹介することで、ブログのトラフィックを増やすことができます。あなたのコンテンツをリポストすることも、強力な社会的証明となります。誰かが投稿やツイートをフォロワーにシェアすると、それはしばしば支持とみなされます。

とはいえ、WordPressでTwitterのシェアボタンやリツイートボタンを追加するのはとても簡単です。以下のクイックリンクから、使いたい方法にジャンプしてください:

方法1:共有カウントを使う(素早く簡単に)

WordPressにTwitter共有ボタンを追加する最も簡単な方法は、Shared Countsプラグインを使用することです。Shared CountsはWordPress用の最高のソーシャルメディアプラグインの一つで、サイトに共有ボタンをすべて追加することができます。

他のソーシャル共有プラグインとは異なり、Shared Countsは独自のキャッシュ方式を採用しているため、サイトのスピードやパフォーマンスに大きな影響を与えることはありません。

まず、プラグインをインストールして有効化する必要があります。WordPressプラグインのインストール方法については、こちらをご覧ください。

有効化したら、Settings ” Shared Countsでプラグインの設定を行います。

The Shared Counts WordPress plugin

開始するには、「表示する共有ボタン」までスクロールします。

初期設定では、Shared CountsはFacebook、Pinterest、Twitterの共有ボタンを追加します。

Adding a Twitter share button using the Shared Counts plugin

FacebookやPinterestの共有ボタンを削除したい場合は、その「x」アイコンをクリックするだけです。

フィールドに入力することで、他のプラットフォームのソーシャル共有ボタンを追加することもできます。ステップバイステップの手順については、WordPressでソーシャル共有ボタンを追加する方法のガイドを参照してください。

Removing Facebook and Pinterest sharing buttons from a WordPress website or blog

これで、WordPressブログで使用するボタンのタイプを選択する必要があります。Shared Countsプラグインのページで各ボタンの例を見ることができます。

シェアボタンのスタイルが決まったら、「シェアボタンのスタイル」ドロップダウンメニューを開き、使用するスタイルを選択します。

Changing the style of a social media sharing button in WordPress

その後、「Theme Location」ドロップダウンメニューを開いて、WordPressテーマのどこにTwitterボタンを表示するかを選択する必要があります。

ここでは、コンテンツ前、コンテンツ後、またはコンテンツ前と後のいずれかを選択できます。

Adding a Twitter sharing button to a WordPress theme

ボタンをページの一番上に追加すれば、より多くの訪問者に見てもらえる。しかし、ほとんどの人は投稿を共有する前に投稿を読みたいと思うでしょう。そのため、「アフターコンテンツ」または「ビフォーアフターコンテンツ」を選択するとよいでしょう。

最後に、Twitterボタンをページや投稿に追加するかどうかを決める必要があります。

初期設定では、Shared Countsは投稿にのみボタンを追加します。しかし、特にランディングページや セールスページをたくさん作成する場合は、ページにも追加した方がよいでしょう。

その場合は、『ページ』の隣にあるボックスにチェックを入れてください。

Adding a Twitter share button to a WordPress page or post

Twitter共有ボタンの設定に満足したら、「変更を保存」をクリックします。

WordPressのサイトにアクセスすると、共有ボタンが表示されます。

A click-to-tweet button, on a WordPress website or blog

方法2:Twitter Feed Proを使う(リツイート獲得に最適)

ページや投稿にシンプルな共有ボタンを追加したい場合は、Shared Countsが良いオプションです。しかし、訪問者に最近のツイートをリツイートするよう促すこともできる。そうすることで、より多くのエンゲージメントを獲得し、コンテンツをさらに広めることができる。

リツイートを増やすには、Smash Balloon Twitter Feed Proを使うのが一番です。このTwitterフィードプラグインを使えば、Twitterフィード全体をページや投稿、ウィジェット対応エリアに追加できます。

An example of an embedded Twitter feed, created using Smash Balloon

各ツイートにはTwitterアクションの列があります。

つまり、訪問者は「リツイート」ボタンをクリックするだけで、ツイートをリポストできる。

An example of retweet buttons, added to WordPress using Smash Balloon

さらに良いことに、フィードは自動的に更新されるため、訪問者は常に新しいツイートを見ることができます。これは、あなたのサイトを常に新鮮で面白く保つのに役立ちます。

プラグインの詳細については、Smash Balloonのレビューをご覧ください。

注: Smash Balloon Twitter Feedプラグインは無料版もあります。しかし、より多くのフィードテンプレートやハッシュタグフィードを表示する機能など、より多くの機能が搭載されているため、私たちはプロバージョンを使用します。

Twitter Feed Proの設定

まず、Smash BalloonのTwitter Feed Proをインストールし、有効化する必要があります。WordPressプラグインのインストール方法については、こちらをご覧ください。

プラグインをインストールしたら、Twitter Feed ” Settingsにアクセスしてください。ライセンスキー」フィールドにSmash Balloonのライセンスキーを入力します。

Adding a license to the Smash Balloon Twitter Feed Pro WordPress plugin

この情報は、Smash Balloonを購入した際に届いた確認メール、およびSmash Balloonのアカウントに記載されています。

ライセンスキーを追加したら、「有効化」ボタンをクリックしてください。

WordPressでTwitterライブフィードを作成する

ここまでできたら、カスタムTwitterフィードを作成する準備は完了です。始めるには、Twitter Feed ” All Feedsに行き、’Add New’ボタンをクリックします。

Adding a Twitter feed to a WordPress website or blog

Smash Balloonで初めてTwitterフィードを追加する場合は、メールアドレスの確認が求められます。

接続』ボタンをクリックし、画面の指示に従うだけです。

Connecting the user's email address with Smash Balloon

完了すると、プラグインのページに戻ります。Smash Balloonには、作成できるTwitterフィードの種類がすべて表示されます。

リツイートを増やしたいので、「ユーザー・タイムライン」を選択して「次へ」をクリックします。

Adding a Twitter user timeline to WordPress

次の画面では、@マークに続いてTwitterアカウント名を入力する必要があります。

準備ができたら「次へ」をクリックし、Smash Balloonのメインエディターを開きます。

Adding a Twitter retweet button to WordPress

次に、Twitterフィードで使用するテンプレートを選択できます。

例えば、「Simple Carousel」を選択して、ツイートをレスポンシブ・スライダーで表示することができます。最新のツイートだけを宣伝したい場合は、代わりに「最新のツイート」テンプレートを選択できます。

すべての画像に「初期設定」のテンプレートを使用しますが、お好きなテンプレートをお選びください。

Choosing a template for an embedded Twitter feed

決定後、「次へ」をクリックします。

Smash Balloonにソーシャルメディアフィードのプレビューが表示され、カスタマイズできるようになります。

The Smash Balloon Twitter feed editor

WordPress Twitterフィードのカスタマイズ

テンプレートの見た目にご不満ですか?テンプレートを変更するには、左側のメニューから「テンプレート」を選択してください。

その後、「変更」ボタンをクリックしてください。

Choosing a new template for a social media feed

新しいレイアウトを選択するポップアップが開きます。

新規テンプレートを選択し、「更新」をクリックするだけです。

Smash Balloon's professionally-designed Twitter templates

それが完了したら、「カスタマイズ」リンクをクリックする必要があります。

これでSmash Balloonのメイン設定に戻ります。

Returning to the main Smash Balloon settings screen

左メニューの次の設定は「フィードレイアウト」なので、クリックしてみてください。

ここでは、Twitterフィードの高さと、訪問者が最初に見るツイートの数を変更できます。また、グリッド、メイソンリー、カルーセルのレイアウトを切り替えることもできます。

Customizing the Twitter feed layout

変更を加えると、プレビューが自動的に更新されるので、さまざまな設定を試して、最適な設定を確認することができます。

お使いのレイアウトによっては、デスクトップ、タブレット、モバイル端末でのSmash Balloonの表示カラム数を変更できる場合があります。

スマートフォンやタブレットは一般的に画面が小さく、処理能力も低いため、モバイル端末ではカラムの表示数を少なくした方がよいでしょう。

これを行うには、「カラム」セクションのドロップダウンメニューを使用するだけです。

Changing the number of columns in an embedded social media layout

フィードレイアウトの設定に満足したら、もう一度「カスタマイザー」をクリックしてメイン設定画面に戻ります。

ここで「配色」をクリックします。

Changing the color scheme to match your WordPress theme

初期設定では、Smash BalloonはWordPressテーマから受け継いだ色を使用しますが、代わりに「ライト」または「ダーク」の配色に切り替えることができます。

もうひとつのオプションは、「カスタム」を選択して独自の配色を作成し、コントロールを使って背景色を変更したり、WordPressの文字色を変更したりすることです。

Adding custom colors to an embedded social media feed

変更が完了したら、もう一度「カスタマイザー」をクリックします。メイン設定画面に戻り、「ヘッダー」をクリックする必要があります。

初期設定では、Smash Balloonのフィードに「Standard」ヘッダーが追加され、「フォロー」ボタンと、あればあなたのTwitterの経歴が表示されます。

Twitterのバイオを非表示にしたい場合は、’バイオを表示’トグルをクリックして無効化します。

Hiding the Twitter bio in your embedded social media feed

もう一つのオプションは「テキスト」を選択することで、フィードに「We are on Twitter」のヘッダーが追加される。

テキスト」ボックスにメッセージを入力すれば、これを自分のメッセージに置き換えることができる。

Adding a header to a WordPress site using Smash Balloon

メッセージに満足したら、ヘッダーのサイズと色を変更できます。

その後、Smash Balloonのメイン設定画面に戻り、「ツイート」を選択します。ここで、「ツイートスタイル」と「個別要素の編集」を選択できます。

Customizing how individual tweets look in WordPress

ツイートスタイル」を選択すると、ボックス型と通常のレイアウトを選択できる。

Boxed」を選ぶと、各ツイートの背景に色を付けることができます。また、枠線の半径を大きくして角をカーブさせたり、ボックスシャドウを追加することもできます。

Adding box shadows to tweets

レギュラー」を選択した場合、ソーシャルメディア投稿を区切る線の太さと色を変更することができます。

変更が完了したら、「ツイート」をクリックします。

Adding different styles to Twitter retweet buttons

これで前の画面に戻る。

今回は、「個別要素の編集」をクリックします。

Customizing the retweet buttons in an embedded Twitter feed

投稿者、ツイートテキスト、Twitterロゴなど、Twitter Feed Proが各ツイートに含めるすべてのコンテンツが表示されます。

できるだけ多くのリツイートを獲得するには、リツイートアイコンを目立たせるのがよいでしょう。そのためには、「ツイートアクション」の横にある矢印をクリックしてください。

Customizing the retweet button in a Twitter feed

ここでは、「サイズ」ドロップダウンを使ってツイートアクションを大きくしたり、色を変更したりできます。

ただ、Smash Balloonは、「リツイート」アイコンだけでなく、すべてのツイートアクションにこれらの変更を適用することに注意してください。

Adding a custom retweet button to WordPress using Smash Balloon

ツイートアクションの見た目に満足したら、「Elements」テキストをクリックします。

これで前の画面に戻ります。

Editing individual elements inside a tweet

このプロセスを繰り返すだけで、他の個々の要素をカスタマイズすることができます。

ボックスのチェックを外すことで、要素を非表示にすることもできます。

Removing content from individual tweets in WordPress

不要なコンテンツを非表示にするのも、リツイートアクションを目立たせるコツだ。

ツイートの見た目に満足したら、Smash Balloonのメイン設定画面に戻り、「Load More Button」を選択します。

Creating a Load More button using Smash Balloon

重要なボタンなので、背景色やマウスオーバーの状態、ラベルなどをサイトのデザインに一致するようにカスタマイズするとよいでしょう。

また、初期設定の「Load More」テキストを「Text」フィールドに入力して、独自のメッセージに置き換えることもできます。

Styling the Load More button in a tweet stream

もう一つのオプションは、無限スクロールを有効化して、訪問者がフィードの最後まで到達したときに新しいツイートが自動的に表示されるようにすることです。これにより、訪問者はあなたのツイートをもっと見るようになり、リツイートが増えるかもしれません。

この機能を有効化するには、「Infinite Scroll」スライダーをクリックして、グレー(無効化)からブルー(有効化)にするだけです。

Adding infinite scroll to your WordPress blog or website

また、Smash Balloonに新しいツイートを読み込むタイミングを指示する「トリガー距離」を変更することもできます。ほとんどのWordPressサイトでは初期設定で問題ありません。

その後、Smash Balloonのメイン設定画面の最後のオプションは「ライトボックス」です。

Customizing the lightbox feature on your WordPress website

初期設定では、Twitter Feed Proは、訪問者がライトボックスのポップアップでフィードの画像や動画をスクロールできるようになっています。

フィードの画像をじっくり見たり、サイトにいながらにして動画を見たりできるので、リツイートを増やすことができる。

An example of a lightbox popup

その点を考慮し、ライトボックスを有効化したままにしておくことをお勧めします。

ただし、この機能を無効化したい場合は、青い「有効化」トグルをクリックしてグレーにするだけでよい。

Disabling the lightbox feature on your WordPress website

Twitterフィードの見た目に満足したら、忘れずに「保存」をクリックしてください。これで、WordPressサイトにTwitterフィードとリツイートボタンを埋め込む準備ができました。

WordPressにTwitterフィードを追加する

フィードをサイトに追加するには、ショートコードまたはTwitterフィードブロックを使用します。最も簡単な方法なので、まずはSmash Balloonブロックを使って任意のページや投稿にフィードを追加する方法を見てみましょう。

複数のフィードを作成した場合は、埋め込みたいフィードのコードを見つける必要があります。

この情報を取得するには、Twitterフィード ” すべてフィードに アクセスし、「ショートコード」列にあるコードをコピーしてください。このコードをサイトに追加する必要がありますので、メモしておいてください。

以下の画像では、[custom-twitter-feeds feed=2]を使用する必要があります。

Adding a Twitter retweet button to your website using shortcode

その後、Twitterフィードを埋め込みたいページや投稿を開きます。次に、「+」アイコンをクリックして新規ブロックを追加し、「Twitter Feed」と入力します。

適切なブロックが表示されたら、クリックしてブログ投稿に追加する。

Adding a Twitter feed using the Twitter Feed WordPress block

このブロックは、初期設定ではあなたのTwitterフィードの1つを表示します。別のフィードを使いたい場合は、右側のメニューから「ショートコードの設定」を見つけてください。

ここでショートコードを追加し、「変更を適用」をクリックするだけです。

Showing a different Twitter feed using shortcode

ブロックにはTwitterフィードが表示され、投稿を公開したり更新したりするだけで、サイト上でその投稿を公開することができます。

もう一つのオプションは、サイドバーなどのウィジェット対応エリアにフィードを追加することです。これにより、訪問者はサイトのどのページからでも最新の投稿をリツイートすることができます。

WordPressダッシュボードの外観 ” ウィジェットに移動し、青い「+」ボタンをクリックするだけです。

Adding a Twitter feed to a widget-ready area

それができたら、「Twitter Feed」と入力して適切なウィジェットを見つける必要がある。

そして、フィードボタンとリツイートボタンを表示したいエリアにドラッグするだけです。

Adding retweet buttons to any widget-ready area

ウィジェットには、Smash Balloonを使って作成したフィードのいずれかが表示されます。

別のTwitterフィードを表示するには、「ショートコード設定」ボックスにフィードのコードをタイプし、「変更を適用」をクリックしてください。

Adding a Twitter feed and retweet buttons using shortcode

更新’ボタンをクリックして、ウィジェットをライブにすることができます。詳細については、WordPressでウィジェットを追加して使用する方法のステップバイステップガイドを参照してください。

最後に、フィードとリツイートボタンは、ショートコードを使用して、任意のページ、投稿、またはウィジェット対応エリアに埋め込むことができます。

Twitter Feed “ All Feedsにアクセスし、’Shortcode’カラムにあるコードをコピーするだけです。これで、サイトのウィジェット対応エリアにショートコードを追加できます。

詳しくは、WordPressでショートコードを追加する方法の詳細ガイドをご覧ください。

WordPressでさらに詳しくTwitterを活用する方法

Twitterプロフィールを最大限に活用してWordPressサイトを宣伝したいですか?それとも、サイトにTwitterコンテンツを追加したいですか?以下のガイドをご覧ください:

この投稿がWordPressにTwitterのシェアボタンとリツイートボタンを追加するのにお役に立てば幸いです。また、メールマガジンの作成方法や、専門家が選ぶ最高のWebプッシュ通知ソフトウェアもご覧ください。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

45件のコメント返信を残す

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk says

    I can only recommend buttons for Twitter and Facebook. They will increase your reach and possibly backlinks. Additionally, creating profiles for your website where people can find you and where you can provide more information is a great way to make yourself known. I have it implemented on my website as well; I would just appreciate some statistics. How many times has someone clicked on the button and made a tweet, and for which article, so I can have a better overview.

  3. Konrad says

    Adding Twitter share and retweet buttons can indeed boost your social media presence. One thing to consider is the placement of these buttons for maximum engagement. It’s beneficial to conduct A/B testing to determine the most effective positions on your site. Additionally, make sure the buttons are clearly visible but not intrusive to the user experience.

  4. THANKGOD JONATHAN says

    This post has opened my eyes.
    I was reluctant to create a twitter account because I think I will not have the time to engage compared to other social sites I love using.
    But now I thing I will give it a try after reading this article.

  5. RandyDueck says

    Thanks for the quick response. I’m not a programmer, do you know where I can get a peice of code and paste it in? Re: Count, I’m thinking then that when testing, If I use the tweet button to post to post to my own page, then twitter doesn’t tink it’s legit? However, I have another twitter acc’t that I tried tweeting to and it didn’t increase. Is there a way I can test it to see that it’s working? How do I know it’s a legit tweet or not? I’m surpirsed that Twitter seems difficult compared to FB @wpbeginner

  6. wpbeginner says

    @RandyDueck Twitter uses the new t.co shortner which only shorten links for their algorithm to make sure it is not SPAM… then it pastes the unshortened version… You have to utilize another API and write a bit of custom code to get the custom short URLs to work there…As far as the count, twitter button only shows count that it thinks are legit.

  7. RandyDueck says

    Thanks for this great little code snippet. I want the twitter button to be in the post excerpt and below the title of the single-post page. the code works fine. gives the correct title etc. however, it does not shorten the link, and after tweeting, the tweet count doesn’t go up. the site is thinkactloveloseweight.com Thank your response

  8. KatrinaMoody says

    Gretchen – all links should trace back to your permalink – so your permalink should be the source URL, not your short link … make sense? YOu can’t yet change the URL shortener if you use the official Tweet button ( I looked into it because I wanted to do a shortlink).

    Adding this so long after the original was posted because others might have that question!

  9. KatrinaMoody says

    I thought I would note that some themes change the value for the title and post url – meaning that the code will tweet with your code in quotes. I got a couple questions on Twitter over that one. I just found the different variables that worked for my site and replaced them. So …

    Line three: data-url=””

    was changed to %permalink% – which was my theme’s replacement

    Line five: data-text=””

    was changed to %post-title% – again my theme’s replacement

    I wouldn’t have been able to do this without your tutorial! Thanks SOOOO much! You are now my go-to resource!

  10. idowebmarketing says

    @wpbeginner @idowebmarketing Okay, there are two locations of this code, and I had only updated one!

  11. wpbeginner says

    @idowebmarketing @wpbeginner data-via is the only thing that needs to be modified in order to make the change.

  12. idowebmarketing says

    @wpbeginner @idowebmarketing Thanks – I added new blog posts to two of my blogs yesterday after implementing the updated code, however it still recommended wpbeginner on both. Is there any section of code that also needs to be updated?

  13. wpbeginner says

    @idowebmarketing On old posts it takes twitter while to figure it out. On new posts it should be fine.

  14. idowebmarketing says

    My blog is still recommending wpbeginner and I have updated the code. Here is the edited code:

    <script src=”http://platform.twitter.com/widgets.js” type=”text/javascript”></script> <a href=”http://twitter.com/share” data-url=”<?php the_permalink(); ?>” data-via=”idowebmarketing” data-text=”<?php the_title(); ?>” data-related=”imnewsdaily:Daily updates from the internet marketing industry” data-count=”vertical”>Tweet</a>Any idea what I am doing wrong?

  15. Richard says

    Thank you for posting this!! I have been trying to slove this problem for about three days now…

    do you have the same code for the facebook like button?

  16. Gretchen says

    I use the WP-generated shortlinks when tweeting about my posts, and have had troubles with those always showing in my Tweet count. The final bit of code on this site seems to work, though if you click to view the search results in Twitter it only shows the links to the actual permalink, not the links to the shortlink as well: http://bavotasan.com/tutorials/adding-tweet-button-wordpress/ It’s too bad WordPress and Twitter don’t count those as the same link somehow…

  17. Zakir says

    I can add javascript in header but it will degrade YSlow rating, currently it is B rating. I really work hard to make B from D. I opened a ticket to twitter technical team, they just sent me email providing some links which may help me to get my answer or open a new ticket if not. Thats so stupid. Twitter people think we didn’t see other answers! thats so frustating. Linkedin doing quite well , their share button updates within a minute.

  18. Zakir says

    In my above mentioned website, i used your code, index.php, single.php and other php file within loop.
    I can click the twitter tweet button and it shows count number, but if i refresh the page, that value goes away. Now after may be 1 hour if i check that article page, i can see the new count value. e.g. before i clicked the button it was 0, after almost 1 hour it shows 1. My question is why it took 1 hour to update. it should be updated immediately isn’t it?

    Now in front page which index.php, i used the code and again i used in single.php. User clicks an article from index.php and comes article page which is in single.php. The problem: count value is not synchronising the count from the index.php to single.php. I check it later it is but after almost 1 hour. so it is synchronising after almost 1 hour.

    Why? any idea.

    Recently I changed the .htaccess file to add expire headers to get some speed. i am getting that but today i removed that line and back to default .htaccess file. Do you think its something with .htaccess where caching is controlled by hour, minutes, seconds, months or even year. Even though if I enable caching, the twitter java script which is twitter server can’t force to use caching.

    Now I am not sure where I should look for to get immediate count value. client wants to see immediate count and synchronise with article page.

    Please check the http://www.bizgene.com to get an idea.

    Any clue or idea will be a great favour.

    I used following code for tweet count button:

    <a href="http://twitter.com/share&quot; class="twitter-share-button"
    data-url="”
    data-via=”bizgene”
    data-text=””
    data-count=”horizontal”>Tweet

    Zakir

    • Editorial Staff says

      Zakir, We think this is a common bug going on with twitter API. We have been noticing a similar thing with our tweetmeme button regarding the count. It synchornizes the count almost after 20 – 30 minutes. Perhaps try adding the script part in your head codes and then display the a href part where you want the button to display might help.

      管理者

  19. Simon says

    I don’t get it. Using the data url link/button above gives just a t.co link and nothing else. Has something changed there or why doesn’t it output the values?

    • Editorial Staff says

      Note, to get the_title(); or the_permalink(); you have to place this code inside the loop. If you place it outside a loop, then it will not give you a desired value.

      管理者

  20. coz says

    ARGH. This is what I tried but im replacing the greater-than/less-than symbols with brackets so it will hopefully show:

    [?php the_title(); ?] #[?php the_category(‘,’); ?]

  21. coz says

    For DataText, im looking to add the title and category of the post as a hashtag. I can’t seem to figure out how to do it, being that I’m not too familiar with php.

    I tried: >>> data-text=” #”

    but that didn’t work. Any idea of how to do this?

  22. Rarst says

    There isn’t much sense in filling out every setting, most of them work just fine without being set and will pick things like current URL and page title by default.

    Non-standard tag attributes will not validate (at least not as XHTML Transitional in my experience so far). Query arguments may not look as tidy, but they are more established and reliable.

  23. Amie says

    Is there any chance I don’t have “The Loop” because I keep looking for this (or even a part of it) in my index file and it’s not there. Gah, I was hoping this would be easy! :-(

  24. DJ NightLife says

    I used to have Topsy buttons… was about to switch for the official button but… It seems this version have a problem recognizing the real count of tweets. I had a post of 52 tweets and now it shows 8.

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。