コメント-RSSフィードへのリンクを追加
コメントのRSSフィードへのリンクを追加
《comments.php》
<div id="comments"> <?php if(have_comments()): ?> <h3>コメント</h3> <ul> <?php wp_list_comments('callback=mydesign'); ?> </ul> <?php endif; ?> <?php comment_form(); ?> <p id="comfeed"> <?php post_comments_feed_link(); ?> </p> </div>
RSSフィードのアイコン画像を表示
#comfeed a { color: #000; text-decoration: none; line-height: 1em; padding: 0 0 0 17px; background-image: url(images/feed-icon-12x12.png); background-repeat: no-repeat; background-position: 0 50%; }
リンクをバーの形で押しやすくする
#comfeed { margin: 30px 0 0 0; padding: 8px; background-color: #DAF2FB; } #comfeed a { color: #000; text-decoration: none; line-height: 1em; display: block; width: 100%; padding: 0 0 0 17px; background-image: url(images/feed-icon-12x12.png); background-repeat: no-repeat; background-position: 0 50%; }
- 表示されるテキスト内容を変更
<p id="comfeed"> <?php post_comments_feed_link('コメントの更新情報'); ?> </p>