Wordpress のコメント機能の問題 (widget 編)

Wordpressでサイドバーなどに最近のコメントを表示させることができる。

しかし、同一のアンカー名称で異なるリンク先をさしてしまうことになるのでその点を修正したメモ。

ファイル:wp-includes/widgets.php

1102行目

//   echo  ‘<li class=”recentcomments”>’ . sprintf(__(’%1$s on %2$s’), get_comment_author_link(), ‘<a href=”‘. get_permalink($comment->comment_post_ID) . ‘#comment-’ . $comment->comment_ID . ‘”>’ . get_the_title($comment->comment_post_ID) . ‘</a>’) . ‘</li>’;

から、

   echo  ‘<li class=”recentcomments”>’ . ‘<a href=”‘. get_permalink($comment->comment_post_ID) . ‘#comment-’ . $comment->comment_ID . ‘”>’ . get_the_title($comment->comment_post_ID) .’に’. get_comment_author(). ‘より</a>’ . ‘</li>’;

に変更。

異業種交流会@東京近郊 にて

このサイトは東京・神奈川・千葉・埼玉で開催される異業種交流会(ビジネス交流会)を紹介したページです。

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

© PHPress since 2008