ソーシャルメディアの公式ページを作って、WordPressのサイトを友人や知人に紹介しよう
以前「WordPressにRSSを追加」という投稿でボタンの設置方法は解説しました。
前回公式ページを作っていなかったのでコメントアウトしておいたものを正式に使います。
具体的にはページ右上に「Google+、Facebook、Twitterボタン」を追加しました。
設置方法
「header.php」の
<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
という記述の後に以前追加したタグを使います。
RSSと合わせて
<div id="menuicon"> <p class="google"><a href="https://plus.google.com/116317665181063532323/posts"><img src="https://oxynotes.com/wp-content/themes/twentyten/images/google+.png" alt="google+公式ページ" title="google+公式ページ" /></a></p> <p class="twitter"><a href="http://twitter.com/#!/oxynotes"><img src="https://oxynotes.com/wp-content/themes/twentyten/images/twitter.png" alt="twitter公式ページ" title="twitter公式ページ" /></a></p> <p class="facebook"><a href="http://www.facebook.com/pages/Oxy-notes/238051846266899"><img src="https://oxynotes.com/wp-content/themes/twentyten/images/facebook.png" alt="facebook公式ページ" title="facebook公式ページ" /></a></p> <p class="rss"><a href="https://oxynotes.com/?feed=rss2"><img src="https://oxynotes.com/wp-content/themes/twentyten/images/rss.png" alt="RSS" title="RSS" /></a></p> </div>
となりました。
このボタンは配布してますので入用の方はどうぞ。
「ソーシャルメディア用アイコン」
続けて表示位置を調節するために「style.css」を編集。
以上で設置完了です。
動作確認でポチポチ押してみてください。