Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $parent_forum = !empty( $instance['parent_forum'] ) ? $instance['parent_forum'] : '0';
- $list_forums = new WP_Query( array(
- 'post_parent' => $parent_forum,
- 'post_type' => bbp_get_forum_post_type(),
- 'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),
- 'orderby' => 'menu_order',
- 'order' => 'ASC'
- ) );
- ?>
- <ul id="list-forums">
- <?php while ( $list_forums->have_posts() ) : $list_forums->the_post(); ?>
- <li>
- <a href="<?php bbp_forum_permalink( $list_forums->post->ID ); ?>" title="<?php bbp_forum_title( $list_forums->post->ID ); ?>">
- <?php bbp_forum_title( $list_forums->post->ID ); ?>
- <span>( <?php bbp_forum_topic_count( $list_forums->post->ID ); ?> )</span>
- </a>
- </li>
- <?php endwhile; ?>
- </ul><!--/list-forums-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement