# bbp-core/trunk/templates/loop-single-reply.php

Forumax – AI Powered Advanced Community Forum Plugin, version trunk. 138 lines.

- Page: https://pluginprobe.com/plugins/bbp-core/trunk/code/templates/loop-single-reply.php
- Raw: https://pluginprobe.com/plugins/bbp-core/trunk/raw/templates/loop-single-reply.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/trunk/code/templates/loop-single-reply.php#L10-L20`.

```php
<?php
/**
 * Replies Loop - Single Reply
 *
 * @package    bbPress
 * @subpackage Theme
 */

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

<div id="post-<?php bbp_reply_id(); ?>" <?php bbp_reply_class( get_the_ID(), array( 'forum-comment' ) ); ?>>
	<?php do_action( 'bbp_theme_before_reply_author_details' ); ?>

    <?php if ( bbp_is_single_user() || bbp_is_single_user_replies() ) : // USER PROFILE PAGE LAYOUT ?>
    
        <div class="forum-post-top">
            <div class="bbp-author-wrap">
                <?php
                // Reply author Avatar
                bbp_reply_author_link( array(
                    'sep'       => '',
                    'show_role' => false,
                    'type'      => 'avatar',
                    'size'      => 40
                ) );
                ?>
                <div class="forum-post-author">
                    <div class="topic-author frmx-d-flex frmx-mb-1">
                        <?php
                        // Reply author Name
                        bbp_reply_author_link( array(
                            'sep'       => '',
                            'show_role' => false,
                            'type'      => 'name',
                        ) );
                        ?>
                        <div class="author-badge badge <?php echo esc_attr( sanitize_title( forumax_get_bbp_reply_user_role( bbp_get_reply_id() ) ) ); ?>">
                            <?php forumax_bbp_user_role_icon(); ?>
                            <span><?php echo esc_html( forumax_get_bbp_reply_user_role( bbp_get_reply_id() ) ); ?></span>
                        </div>
                    </div>
                    <div class="forum-author-meta meta">
                        <span title="<?php bbp_reply_post_date( bbp_get_reply_id() ); ?>">
                            <?php bbp_reply_post_date( bbp_get_reply_id(), true ); ?>
                        </span>
                    </div>
                    <?php do_action( 'bbp_theme_after_reply_author_details' ); ?>
                </div>
            </div>
            <!-- Reply right side actions -->
            <div class="reply-admin-links">
                <?php if ( isset( $GLOBALS['bbp_private_replies'] ) && $GLOBALS['bbp_private_replies']->is_private( bbp_get_reply_id() ) && $GLOBALS['bbp_private_replies']->can_view_private_reply( bbp_get_reply_id() ) ) : ?>
                    <span class="private-reply-badge" title="<?php esc_attr_e( 'Private reply', 'forumax' ); ?>">
                        <?php esc_html_e( 'Private', 'forumax' ); ?>
                    </span>
                <?php endif; ?>
                <span class="reply-admin-menu-wrap">
                    <?php echo forumax_get_reply_admin_links(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
                </span>
            </div>
        </div>
            <div class="comment-content">
                <?php
                do_action( 'bbp_theme_before_reply_content' );
                bbp_reply_content();
                do_action( 'bbp_theme_after_reply_content' );
                ?>
            </div>

    <?php else : // SINGLE TOPIC THREAD LAYOUT ?>

        <div class="frmx-reply-avatar">
            <?php
            // Reply author Avatar
            bbp_reply_author_link( array(
                'sep'       => '',
                'show_role' => false,
                'type'      => 'avatar',
                'size'      => 40
            ) );

            do_action( 'forumax_reply_avatar_voting', get_post( bbp_get_reply_id() ) );
            ?>
        </div>

        <div class="frmx-reply-card">
            <div class="forum-post-top">
                <div class="bbp-author-wrap">
                    <div class="forum-post-author">
                        <div class="topic-author frmx-d-flex frmx-mb-1">
                            <?php
                            // Reply author Name
                            bbp_reply_author_link( array(
                                'sep'       => '',
                                'show_role' => false,
                                'type'      => 'name',
                            ) );
                            ?>
                            <div class="author-badge badge <?php echo esc_attr( sanitize_title( forumax_get_bbp_reply_user_role( bbp_get_reply_id() ) ) ); ?>">
                                <?php forumax_bbp_user_role_icon(); ?>
                                <span><?php echo esc_html( forumax_get_bbp_reply_user_role( bbp_get_reply_id() ) ); ?></span>
                            </div>
                        </div>

                        <div class="forum-author-meta meta">
                            <span title="<?php bbp_reply_post_date( bbp_get_reply_id() ); ?>">
                                <?php bbp_reply_post_date( bbp_get_reply_id(), true ); ?>
                            </span>
                        </div>
                        <?php do_action( 'bbp_theme_after_reply_author_details' ); ?>
                    </div>
                </div>
                <!-- Reply right side actions -->
                <div class="reply-admin-links">
                    <?php if ( isset( $GLOBALS['bbp_private_replies'] ) && $GLOBALS['bbp_private_replies']->is_private( bbp_get_reply_id() ) && $GLOBALS['bbp_private_replies']->can_view_private_reply( bbp_get_reply_id() ) ) : ?>
                        <span class="private-reply-badge" title="<?php esc_attr_e( 'Private reply', 'forumax' ); ?>">
                            <?php esc_html_e( 'Private', 'forumax' ); ?>
                        </span>
                    <?php endif; ?>
                    <span class="reply-admin-menu-wrap">
                        <?php echo forumax_get_reply_admin_links(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
                    </span>
                </div>
            </div>
            <div class="comment-content">
                <?php
                do_action( 'bbp_theme_before_reply_content' );
                bbp_reply_content();
                do_action( 'bbp_theme_after_reply_content' );
                ?>
            </div>
        </div>

    <?php endif; ?>

</div>
```
