WP-PostVews カテゴリ名の表示方法について
-
WP-PostVewsをしようして、人気記事を表示しているのですが、カテゴリ名を表示させる方法が全く分からず、手も足も出ない状況になってしまいました。
wp-postviews.phpを編集しなければならないと思うのですが、どのように記述すれば良いのでしょうか。下記は現在記述しているコードになります。
if($most_viewed) { $rankingNo = 1;//順位を計数する変数の定義 foreach ($most_viewed as $post) { $post_views = intval($post->views); $post_title = get_the_title($post); if($chars > 0) { $post_title = snippet_text($post_title, $chars); } $post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars); $thumbnail = get_the_post_thumbnail($post->ID,"thumbnail",true);//サムネイルを表示 $temp = stripslashes($views_options['most_viewed_template']); $temp = str_replace("%VIEW_COUNT%", number_format_i18n($post_views), $temp); $temp = str_replace("%POST_TITLE%", $post_title, $temp); $temp = str_replace("%POST_EXCERPT%", $post_excerpt, $temp); $temp = str_replace("%POST_CONTENT%", $post->post_content, $temp); $temp = str_replace("%POST_URL%", get_permalink($post), $temp); $temp = str_replace("%THUMBNAIL%", $thumbnail, $temp);//サムネイルを表示 $temp = str_replace("%RANKING_NO%", $rankingNo, $temp);//変数への代入 $temp = str_replace("%POST_DATE%", get_the_time(get_option('date_format'), $post), $temp); $temp = str_replace("%POST_TIME%", get_the_time(get_option('time_format'), $post), $temp); $output .= $temp; $rankingNo++;//順位のカウントアップ }どなたかお分かりになる方いらっしゃいましたら、どうかご教授お願い致します。
トピック「WP-PostVews カテゴリ名の表示方法について」には新たに返信することはできません。