• WP-PostViewsを用いて人気記事を表示する際、各記事毎に設定しているカテゴリ名とタグ名をリンク付きで表示したいと思っています。
    wp-postviews.phpにどのような記述を加えればよいのか教えてください。よろしくお願いします。

1件の返信を表示中 - 1 - 1件目 (全1件中)
  • トピック投稿者 bumsos

    (@bumsos)

    201〜212行目の所に

    $post_excerpt = views_post_excerpt($post->post_excerpt, $post->post_content, $post->post_password, $chars);
    $thumbnail = get_the_post_thumbnail($post->ID, array(210,140), array(‘alt’=>$post_title, ‘title’=>$post_title));
    $tag = get_the_tags($post->ID);
    $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(“%TAG%”, $tag, $temp);
    $output .= $temp;

    太字部分を追加してみましたが、Arrayと表示されてしまいます。
    どこがいけないのでしょう。。。

1件の返信を表示中 - 1 - 1件目 (全1件中)
  • トピック「WP-PostViewsでカテゴリとタグの表示」には新たに返信することはできません。