「BB press」のユーザー別トピック一覧
-
プラグイン「BB press」で、表示中ユーザーが作ったトピック一覧を5件出力するコード、のつもりなのですが…、
どこが間違っているのか教えて頂けませんでしょうか?
<?php $UID = bp_displayed_user_id(); ?> <h2><?php echo $UID; ?>さんのトピック一覧</h2> <?php $bbp_loop_args = array( 'post_parent' => 77, //フォーラムのIDです 'post_type' => 'topic', 'posts_per_page' => 5, 'comment_count' => '1', 'orderby' => 'newest', 'user_id' => $UID ); $BB_Query = new WP_Query( $bbp_loop_args ); if ( $BB_Query->have_posts() ) { $html = '<li class="forum-list"><span class="bbp-topic-started-by"><!--Started by:-->%1$s</span><a class="bbp-forum-topic-title" href="%2$s">%3$s</a><span class="reply-count">%4$d</span></li>'; ?><ul><?php while ( $BB_Query->have_posts() ) { $BB_Query->the_post(); $author_link = bbp_get_topic_author_link( array( 'post_id' => get_the_ID(), 'type' => 'avatar', 'size' => 32 ) ); $avatar_allowd_tags = array( 'a' => array( 'href' => true, 'id' => true, 'class' => true, target => true ), 'img' => array( 'src' => true, 'id' => true, 'alt' => true, 'class' => true ), ); printf( $html, wp_kses( $author_link, $avatar_allowd_tags ), esc_url( bbp_get_topic_permalink() ), wp_kses( bbp_get_topic_title(),array() ), absint( bbp_get_topic_reply_count( get_the_ID() ) ) ); } ?></ul><?php } wp_reset_query(); ?>
4件の返信を表示中 - 1 - 4件目 (全4件中)
4件の返信を表示中 - 1 - 4件目 (全4件中)
- トピック「「BB press」のユーザー別トピック一覧」には新たに返信することはできません。