# wpforo/3.1.6/themes/classic/post.php

wpForo Forum, version 3.1.6. 50 lines.

- Page: https://pluginprobe.com/plugins/wpforo/3.1.6/code/themes/classic/post.php
- Raw: https://pluginprobe.com/plugins/wpforo/3.1.6/raw/themes/classic/post.php
- Modified: 2026-09-18T16:11:00+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/wpforo/3.1.6/code/themes/classic/post.php#L10-L20`.

```php
<?php
if( ( ( $topic = WPF()->current_object['topic'] ) && wpforo_is_owner( $topic['userid'], $topic['email'] ) ) || ( WPF()->perm->forum_can( 'vt' ) && WPF()->perm->forum_can( 'ent' ) ) ):
	
	if( ( $forum = WPF()->current_object['forum'] ) && ( $topic = WPF()->current_object['topic'] ) && ( $posts = WPF()->current_object['posts'] ) ) :
		if( ! ( $topic['private'] && ! wpforo_is_owner( $topic['userid'], $topic['email'] ) && ! WPF()->perm->forum_can( 'vp' ) ) ): ?>

            <div class="wpf-head-bar">
				<?php wpforo_single_title( 'post', $topic, '<h1 id="wpforo-title">', '</h1>' ); ?>
                <div class="wpf-action-link">
					<?php do_action( 'wpforo_template_post_head_bar_action_links', $forum, $topic, $posts ); ?>
                </div>
            </div>
			<?php do_action( 'wpforo_template_post_head_bar', $forum, $topic, $posts ); ?>

			<?php
			wpforo_template_pagenavi( 'wpf-navi-post-top' );
			if( $forum['layout'] == 3 ) include_once( wpftpl( 'layouts/3/comment.php' ) );
			$template_path = wpftpl( 'layouts/' . $forum['layout'] . '/post.php' );
			if( file_exists( $template_path ) ) {
				include( $template_path );
			}
			wpforo_template_pagenavi( 'wpf-navi-post-bottom' );
			
			if( WPF()->perm->forum_can( 'cr' ) || ( wpforo_is_owner( $topic['userid'], $topic['email'] ) && WPF()->perm->forum_can( 'ocr' ) ) ) {
				WPF()->tpl->reply_form( $topic );
			} elseif( ! WPF()->current_userid ) {
				WPF()->tpl->please_login();
			}
			do_action( 'wpforo_post_list_footer' );
		
		else: ?>
            <p class="wpf-p-error">
				<?php wpforo_phrase( 'Topic are private, please register or login for further information' ) ?>
            </p>
		<?php endif;
	endif;

else : ?>
    <p class="wpf-p-error">
		<?php if( WPF()->current_userid ): ?>
			<?php echo apply_filters( 'wpforo_no_topic_access_message_for_users', wpforo_phrase( "Your user level does not have appropriate permission to view the content", false ) ); ?>
		<?php else: ?>
			<?php echo apply_filters(
				'wpforo_no_topic_access_message_for_guests',
				wpforo_phrase( "You do not have permission to view the content", false ) . '<br>' . wpforo_get_login_or_register_notice_text()
			); ?>
		<?php endif; ?>
    </p>
<?php endif;

```
