# bbp-core/2.5.0/templates/content-single-forum.php

Forumax – AI Powered Advanced Community Forum Plugin, version 2.5.0. 105 lines.

- Page: https://pluginprobe.com/plugins/bbp-core/2.5.0/code/templates/content-single-forum.php
- Raw: https://pluginprobe.com/plugins/bbp-core/2.5.0/raw/templates/content-single-forum.php
- Modified: 2026-08-13T11:39:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/bbp-core/2.5.0/code/templates/content-single-forum.php#L10-L20`.

```php
<?php

/**
 * Single Forum Content Part
 *
 * @package bbPress
 * @subpackage Theme
 */

// Exit if accessed directly
defined('ABSPATH') || exit;

$has_sidebar = is_active_sidebar('forum_archive_sidebar');
$main_column = $has_sidebar ? '8' : '12';
?>
<div class="frmx-row frmx-sidebar-<?php echo esc_attr(forumax_get_opt('sidebar_position', 'right')); ?>">
    <div class="frmx-col-lg-<?php echo esc_attr($main_column); ?>">

        <?php do_action('bbp_template_before_single_forum'); ?>

        <?php if (post_password_required()): ?>

            <?php bbp_get_template_part('form', 'protected'); ?>

        <?php else: ?>

            <div class="frmx-forum-description-row">
                <div class="frmx-forum-description-text">
                    <?php bbp_single_forum_description(); ?>
                </div>
                <?php if ( bbp_is_subscriptions_active() ) : ?>
                    <div class="frmx-forum-subscription-action">
                        <?php if ( is_user_logged_in() ) : ?>
                            <span id="subscription-toggle">
                                <?php
                                bbp_forum_subscription_link( array(
                                    'before'      => '',
                                    'after'       => '',
                                    'subscribe'   => esc_html__( 'Subscribe', 'forumax' ),
                                    'unsubscribe' => esc_html__( 'Subscribed', 'forumax' ),
                                ) );
                                ?>
                            </span>
                        <?php else : ?>
                            <?php if ( forumax_get_opt( 'is_forum_subscription', '1' ) == 1 ) : ?>
                                <button class="subscription-login-btn frmx-subscribe-trigger-btn"><?php esc_html_e( 'Subscribe', 'forumax' ); ?></button>
                                <div class="subscription-login-modal frmx-forum-sub-modal">
                                    <div class="subscription-login-modal-inner">
                                        <button class="subscription-login-modal-close" aria-label="<?php esc_attr_e( 'Close', 'forumax' ); ?>">&times;</button>
                                        <h3 class="frmx-inline-login-title"><?php echo esc_html( forumax_get_opt( 'forum_subscription_modal_title', __( 'Login to the community', 'forumax' ) ) ); ?></h3>
                                        <p class="frmx-inline-login-subtitle"><?php echo esc_html( forumax_get_opt( 'forum_subscription_modal_subtitle', __( 'You must be logged in to subscribe to this forum.', 'forumax' ) ) ); ?></p>
                                        <div class="frmx-subscription-login-form">
                                            <?php
                                            // Only render login here when the page has no inline topic login
                                            // (e.g. forum category). Otherwise one form lives in form-topic.
                                            if ( bbp_is_forum_category() ) :
                                                forumax_render_topic_login_form();
                                            else :
                                                ?>
                                                <button type="button" class="button fill-brand frmx-scroll-to-login">
                                                    <?php esc_html_e( 'Go to login form', 'forumax' ); ?>
                                                </button>
                                                <?php
                                            endif;
                                            ?>
                                        </div>
                                    </div>
                                </div>
                            <?php endif; ?>
                        <?php endif; ?>
                    </div>
                <?php endif; ?>
            </div>
           
            <?php if (bbp_has_forums()): ?>

                <?php bbp_get_template_part('loop', 'forums'); ?>

            <?php endif; ?>

            <?php if (!bbp_is_forum_category() && bbp_has_topics()): ?>

                <?php bbp_get_template_part('loop', 'topics'); ?>

                <?php bbp_get_template_part('form', 'topic'); ?>

            <?php elseif (!bbp_is_forum_category()): ?>

                <?php bbp_get_template_part('form', 'topic'); ?>

            <?php endif; ?>

        <?php endif; ?>

        <?php do_action('bbp_template_after_single_forum'); ?>
    </div>

    <?php if ($has_sidebar): ?>
        <div class="frmx-col-lg-4">
            <aside class="forum-sidebar">
                <?php dynamic_sidebar('forum_archive_sidebar'); ?>
            </aside>
        </div>
    <?php endif; ?>
</div>
```
