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

Forumax – AI Powered Advanced Community Forum Plugin, version 2.4.0. 123 lines.

- Page: https://pluginprobe.com/plugins/bbp-core/2.4.0/code/templates/content-single-forum.php
- Raw: https://pluginprobe.com/plugins/bbp-core/2.4.0/raw/templates/content-single-forum.php
- Modified: 2026-06-10T13:02:40+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.4.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 if ( function_exists( 'forumax_get_opt' ) && forumax_get_opt( 'topic_login_shortcode' ) ) : ?>
                                                <?php echo do_shortcode( forumax_get_opt( 'topic_login_shortcode' ) ); ?>
                                            <?php else : ?>
                                                <form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
                                                    <fieldset class="bbp-form">
                                                        <legend><?php esc_html_e( 'Log In', 'forumax' ); ?></legend>

                                                        <div class="bbp-username">
                                                            <label for="frmx-forum-sub-user-login"><?php esc_html_e( 'Username', 'forumax' ); ?>: </label>
                                                            <input type="text" name="log" value="" size="20" maxlength="100" id="frmx-forum-sub-user-login" placeholder="<?php esc_attr_e( 'Username or Email', 'forumax' ); ?>" autocomplete="off" />
                                                        </div>

                                                        <div class="bbp-password">
                                                            <label for="frmx-forum-sub-user-pass"><?php esc_html_e( 'Password', 'forumax' ); ?>: </label>
                                                            <input type="password" name="pwd" value="" size="20" id="frmx-forum-sub-user-pass" placeholder="<?php esc_attr_e( 'Password', 'forumax' ); ?>" autocomplete="off" />
                                                        </div>

                                                        <div class="bbp-remember-me">
                                                            <input type="checkbox" name="rememberme" value="forever" id="frmx-forum-sub-rememberme" />
                                                            <label for="frmx-forum-sub-rememberme"><?php esc_html_e( 'Keep me signed in', 'forumax' ); ?></label>
                                                        </div>

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

                                                        <div class="bbp-submit-wrapper">
                                                            <button type="submit" name="user-submit" id="frmx-forum-sub-user-submit" class="button submit user-submit fill-brand"><?php esc_html_e( 'Log In', 'forumax' ); ?></button>
                                                            <?php bbp_user_login_fields(); ?>
                                                        </div>
                                                    </fieldset>
                                                </form>
                                            <?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>
```
