Skip to content

Instantly share code, notes, and snippets.

@ntwb
Last active Aug 29, 2015
Embed
What would you like to do?
<?php
/**
* Archive Forum Content Part
*
* @package bbPress
* @subpackage Theme
*/
?>
<div id="bbpress-forums">
<?php if ( bbp_allow_search() ) : ?>
<div class="bbp-search-form">
<?php bbp_get_template_part( 'form', 'search' ); ?>
</div>
<?php endif; ?>
<?php bbp_breadcrumb(); ?>
<?php bbp_forum_subscription_link(); ?>
<?php do_action( 'bbp_template_before_forums_index' ); ?>
<?php if ( bbp_has_forums() ) : ?>
<?php bbp_get_template_part( 'loop', 'forums' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'feedback', 'no-forums' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_template_after_forums_index' ); ?>
</div>
<?php echo do_shortcode("[bbp-stats]"); ?>
<?php
/**
* Archive Topic Content Part
*
* @package bbPress
* @subpackage Theme
*/
?>
<div id="bbpress-forums">
<?php if ( bbp_allow_search() ) : ?>
<div class="bbp-search-form">
<?php bbp_get_template_part( 'form', 'search' ); ?>
</div>
<?php endif; ?>
<?php bbp_breadcrumb(); ?>
<?php do_action( 'bbp_template_before_topic_tag_description' ); ?>
<?php if ( bbp_is_topic_tag() ) : ?>
<?php bbp_topic_tag_description( array( 'before' => '<div class="bbp-template-notice info"><p>', 'after' => '</p></div>' ) ); ?>
<?php endif; ?>
<?php do_action( 'bbp_template_after_topic_tag_description' ); ?>
<?php do_action( 'bbp_template_before_topics_index' ); ?>
<?php if ( bbp_has_topics() ) : ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'loop', 'topics' ); ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_template_after_topics_index' ); ?>
</div>
<?php
/**
* Statistics Content Part
*
* @package bbPress
* @subpackage Theme
*/
// Get the statistics
$stats = bbp_get_statistics(); ?>
<?php do_action( 'bbp_before_statistics' ); ?>
<div class="bbp-stats">
<ul class="bbp_stats">
<li> <?php _e( 'Users', 'bbpress' ); ?>
<strong><?php echo esc_html( $stats['user_count'] ); ?></strong>
</li>
<li> <?php _e( 'Topics', 'bbpress' ); ?>
<strong><?php echo esc_html( $stats['topic_count'] ); ?></strong>
</li>
<li> <?php _e( 'Replies', 'bbpress' ); ?>
<strong><?php echo esc_html( $stats['reply_count'] ); ?></strong>
</li>
</ul>
</div>
<?php do_action( 'bbp_after_statistics' ); ?>
<?php unset( $stats );
<?php
/**
* Topics Loop
*
* @package bbPress
* @subpackage Theme
*/
?>
<?php do_action( 'bbp_template_before_topics_loop' ); ?>
<a class="bbp-new-topic-button" href="#new-post">New Thead</a>
<ul id="bbp-forum-<?php bbp_forum_id(); ?>" class="bbp-topics">
<li class="bbp-header">
<ul class="forum-titles">
<li class="bbp-topic-title"><?php _e( 'Topic', 'bbpress' ); ?></li>
<li class="bbp-topic-voice-count"><?php _e( 'Voices', 'bbpress' ); ?></li>
<li class="bbp-topic-reply-count"><?php bbp_show_lead_topic() ? _e( 'Replies', 'bbpress' ) : _e( 'Posts', 'bbpress' ); ?></li>
<li class="bbp-topic-freshness"><?php _e( 'Freshness', 'bbpress' ); ?></li>
</ul>
</li>
<li class="bbp-body">
<?php while ( bbp_topics() ) : bbp_the_topic(); ?>
<?php bbp_get_template_part( 'loop', 'single-topic' ); ?>
<?php endwhile; ?>
</li>
<li class="bbp-footer">
<div class="tr">
<p>
<span class="td colspan<?php echo ( bbp_is_user_home() && ( bbp_is_favorites() || bbp_is_subscriptions() ) ) ? '5' : '4'; ?>">&nbsp;</span>
</p>
</div><!-- .tr -->
</li>
</ul><!-- #bbp-forum-<?php bbp_forum_id(); ?> -->
<?php do_action( 'bbp_template_after_topics_loop' ); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment