1. I created a new template file titled discussions-replies and discussions-subscriptions under my WordPress child theme.
2. I placed within discussions-replies the following code:
<?php
/*
Template Name: Discussions Replies Created
*/
get_header();
// Page options
$header = ghostpool_option( 'page_header' ) == 'default' ? ghostpool_option( 'page_page_header' ) : ghostpool_option( 'page_header' );
$height = ghostpool_option( 'page_header_height', 'padding-bottom' ) != '' ? ghostpool_option( 'page_header_height', 'padding-bottom' ) : ghostpool_option( 'page_page_header_height', 'height' );
$format = ghostpool_option( 'blog_format' );
$style = ghostpool_option( 'blog_style' );
$alignment = ghostpool_option( 'blog_alignment' );
$cats = ghostpool_option( 'blog_cats' ) ? implode( ',', ghostpool_option( 'blog_cats' ) ) : '';
$post_types = ghostpool_option( 'blog_post_types' ) ? implode( ',', ghostpool_option( 'blog_post_types' ) ) : ghostpool_option( 'blog_post_types' );
$orderby = ghostpool_option( 'blog_orderby' );
$per_page = ghostpool_option( 'blog_per_page' );
$offset = ghostpool_option( 'blog_offset' );
$image_size = ghostpool_option( 'blog_image_size' );
$content_display = ghostpool_option( 'blog_content_display' );
$excerpt_length = ghostpool_option( 'blog_excerpt_length' );
$meta_author = ghostpool_option( 'blog_meta', 'author' );
$meta_date = ghostpool_option( 'blog_meta', 'date' );
$meta_comment_count = ghostpool_option( 'blog_meta', 'comment_count' );
$meta_views = ghostpool_option( 'blog_meta', 'views' );
$meta_likes = ghostpool_option( 'blog_meta', 'likes' );
$meta_cats = ghostpool_option( 'blog_meta', 'cats' );
$meta_tags = ghostpool_option( 'blog_meta', 'tags' );
$read_more_link = ghostpool_option( 'blog_read_more_link' );
$pagination = 'page-numbers';
?>
<div class="sub-nav-container">
<div class="sub-nav-pagetitle">
<h1><?php the_title(); ?></h1>
</div>
<div class="sub-nav-about-menu">
<?php wp_nav_menu( array( 'theme_location' => 'sub-nav-discuss-menu', 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'sub-nav-discuss-menu', 'fallback_cb' => 'null', 'walker' => new Ghostpool_Custom_Menu ) ); ?>
</div>
<div class="sub-nav-extramenu">
</div>
</div>
<div id="gp-content-wrapper" class="gp-container">
<?php do_action( 'ghostpool_begin_content_wrapper' ); ?>
<div id="gp-inner-container">
<div id="gp-content">
<div class="gp-entry-content">
<div id="bbpress-forums">
<?php do_action( 'bbp_template_before_user_replies' ); ?>
<div id="bbp-user-replies-created" class="bbp-user-replies-created">
<div class="bbp-user-section">
<?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
<?php if ( bbp_get_user_replies_created( $user_id = bp_loggedin_user_id() ) ) : ?>
<?php bbp_get_template_part( 'pagination', 'replies' ); ?>
<?php bbp_get_template_part( 'loop', 'replies' ); ?>
<?php bbp_get_template_part( 'pagination', 'replies' ); ?>
<?php else : ?>
<p><?php _e( 'You have not replied to any topics.', 'bbpress' ); ?></p>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<?php get_sidebar( 'left' ); ?>
<?php get_sidebar( 'right' ); ?>
</div>
<?php do_action( 'ghostpool_end_content_wrapper' ); ?>
<div class="gp-clear"></div>
</div>
<?php get_footer(); ?>
In discussions-subscriptions template I inserted the following code:
<?php
/*
Template Name: Discussions Subscriptions
*/
get_header();
// Page options
$header = ghostpool_option( 'page_header' ) == 'default' ? ghostpool_option( 'page_page_header' ) : ghostpool_option( 'page_header' );
$height = ghostpool_option( 'page_header_height', 'padding-bottom' ) != '' ? ghostpool_option( 'page_header_height', 'padding-bottom' ) : ghostpool_option( 'page_page_header_height', 'height' );
$format = ghostpool_option( 'blog_format' );
$style = ghostpool_option( 'blog_style' );
$alignment = ghostpool_option( 'blog_alignment' );
$cats = ghostpool_option( 'blog_cats' ) ? implode( ',', ghostpool_option( 'blog_cats' ) ) : '';
$post_types = ghostpool_option( 'blog_post_types' ) ? implode( ',', ghostpool_option( 'blog_post_types' ) ) : ghostpool_option( 'blog_post_types' );
$orderby = ghostpool_option( 'blog_orderby' );
$per_page = ghostpool_option( 'blog_per_page' );
$offset = ghostpool_option( 'blog_offset' );
$image_size = ghostpool_option( 'blog_image_size' );
$content_display = ghostpool_option( 'blog_content_display' );
$excerpt_length = ghostpool_option( 'blog_excerpt_length' );
$meta_author = ghostpool_option( 'blog_meta', 'author' );
$meta_date = ghostpool_option( 'blog_meta', 'date' );
$meta_comment_count = ghostpool_option( 'blog_meta', 'comment_count' );
$meta_views = ghostpool_option( 'blog_meta', 'views' );
$meta_likes = ghostpool_option( 'blog_meta', 'likes' );
$meta_cats = ghostpool_option( 'blog_meta', 'cats' );
$meta_tags = ghostpool_option( 'blog_meta', 'tags' );
$read_more_link = ghostpool_option( 'blog_read_more_link' );
$pagination = 'page-numbers';
?>
<div class="sub-nav-container">
<div class="sub-nav-pagetitle">
<h1><?php the_title(); ?></h1>
</div>
<div class="sub-nav-about-menu">
<?php wp_nav_menu( array( 'theme_location' => 'sub-nav-discuss-menu', 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'sub-nav-discuss-menu', 'fallback_cb' => 'null', 'walker' => new Ghostpool_Custom_Menu ) ); ?>
</div>
<div class="sub-nav-extramenu">
</div>
</div>
<div id="gp-content-wrapper" class="gp-container">
<?php do_action( 'ghostpool_begin_content_wrapper' ); ?>
<div id="gp-inner-container">
<div id="gp-content">
<div class="gp-entry-content">
<div id="bbpress-forums">
<div id="bbp-user-subscriptions" class="bbp-user-subscriptions">
<h2>Subscribed Forums</h2>
<?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
<?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?>
<?php bbp_get_template_part( 'pagination', 'forums' ); ?>
<?php bbp_get_template_part( 'loop', 'forums' ); ?>
<?php bbp_get_template_part( 'pagination', 'forums' ); ?>
<?php else : ?>
<p><?php _e( 'You are not currently subscribed to any forums.', 'bbpress' ); ?></p>
<?php endif; ?>
<br><br>
<h2>Subscribed Topics</h2>
<?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
<?php if ( bbp_get_user_topic_subscriptions( $uid ) ) : ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'loop', 'topics' ); ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php else : ?>
<p><?php _e( 'You are not currently subscribed to any topics.', 'bbpress' ); ?></p>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php get_sidebar( 'left' ); ?>
<?php get_sidebar( 'right' ); ?>
</div>
<?php do_action( 'ghostpool_end_content_wrapper' ); ?>
<div class="gp-clear"></div>
</div>
<?php get_footer(); ?>
3. I then created two new pages with WordPress under their parent named “Discussions”, one page titled Replies and the other Subscriptions. I then assigned each page to their proper template that I just had created.
4. Now when I load the pages, the code is asking for a current user, however it ignores and shows on Replies all replies made by all users; on Subscriptions it shows that the user has made NO subscriptions, even though they have.