【コピペ用】WordPressにSNSボタンを設置 2015年6月版 | 東京都世田谷区 ホームページ制作 [k]id

【コピペ用】WordPressにSNSボタンを設置 2015年6月版

Category WordPress Tips Update 2015.06.24

twitterfacebookgoogle+はてなブックマークPocketであとで読むfeedlyで購読

1、WordPressでのSNSボタン設置

WordPressにてSNSボタンを設置するにはplug-in等を利用する方法もありますが、
インストールの必要やデザインを自分で変えられない等、ちょっと不便な所もあります。

当ブログは単純(カウントなし)ボタンを押すだけのボタンを設置しています。

2、SNSボタンの設置方法

下記をテンプレートに記述してください。
『画像タグURL』の部分はご自分サイトにあったデザインで画像をお作りください。

<!-- twitter -->
<a id="sns_twitter"  href="http://twitter.com/intent/tweet?text=<?php urlencode(the_title())?>&url=<?php the_permalink() ?>" target="_blank">画像タグURL</a>
<!-- facebook -->
<a  id="sns_facebook" href="http://www.facebook.com/share.php?u=<?php the_permalink() ?>" onclick="window.open(this.href,'facebookwindow', 'width=550, height=450,personalbar=0,toolbar=0,scrollbars=1,resizable=1'); return false;">画像タグURL</a>
<!-- google plus -->
<a  id="sns_google_plus" href="https://plus.google.com/share?url=<?php the_permalink() ?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">画像タグURL</a>
<!-- はてブ -->
<a  id="sns_hatena" href="http://b.hatena.ne.jp/append?<?php the_permalink() ?>">画像タグURL</a>
<!-- Pocket -->
<a  id="sns_pocket" href="http://getpocket.com/edit?url=<?php the_permalink() ?>&title=<?php urlencode(the_title())?>" onclick="window.open(this.href, 'PCwindow', 'width=550, height=350, menubar=no, toolbar=no, scrollbars=yes'); return false;">画像タグURL</a>
<!-- feedly -->
<a id="sns_feedly" href='http://cloud.feedly.com/#subscription/feed/<?php bloginfo("rss2_url"); ?>'   target="_blank">画像タグURL</a>

 

3、SNSボタン

デザインが難しい方は下記のボタンをご利用ください。

twitter
http://kidokorock.com/wp-content/themes/kid_2015/images/common/bt_sns_t.png

twitter

facebook
http://kidokorock.com/wp-content/themes/kid_2015/images/common/bt_sns_f.png

facebook

google+
http://kidokorock.com/wp-content/themes/kid_2015/images/common/bt_sns_g.png

google+

はてなブックマーク
http://kidokorock.com/wp-content/themes/kid_2015/images/common/bt_sns_h.png

はてなブックマーク

Pocket
http://kidokorock.com/wp-content/themes/kid_2015/images/common/bu_sns_p.png

Pocketであとで読む

feedly
http://kidokorock.com/wp-content/themes/kid_2015/images/common/bu_sns_fe.png

feedlyで購読

ページトップへ