This is my latest code
<?php
/**
* Topics Loop
*
* @package bbPress
* @subpackage Theme
*/?>
<?php do_action( 'bbp_template_before_topics_loop' ); ?>
<?php if ( bbp_has_topics() ) : ?>
<ul id="bbp-forum-<?php bbp_forum_id(); ?>" class="bbp-topics">
<?php if( ! empty( $forum_id) && bbp_has_topics( array( 'post_parent' => $forum_id ) ) ) :?>
<li class="bbp-header">
<ul class="forum-titles">
<li class="bbp-topic-title"><?php _e( 'Topic', 'bbpress' ); ?>
<li class="bbp-topic-voice-count"><?php _e( 'Voices', 'bbpress' ); ?>
<li class="bbp-topic-reply-count"><?php bbp_show_lead_topic() ? _e( 'Replies', 'bbpress' ) : _e( 'Posts', 'bbpress' ); ?>
<li class="bbp-topic-freshness"><?php _e( 'Freshness', 'bbpress' ); ?><li class="bbp-body">
<?php while ( bbp_topics() ) : bbp_the_topic(); ?>
<?php bbp_get_template_part( 'loop', 'single-topic' ); ?>
<?php endwhile; ?>
<li class="bbp-footer">
<div class="tr">
<p>
<span class="td colspan<?php echo ( bbp_is_user_home() && ( bbp_is_favorites() || bbp_is_subscriptions() ) ) ? '5' : '4'; ?>"> </span>
</p>
</div><!-- .tr --><!-- #bbp-forum-<?php bbp_forum_id(); ?> -->
<?php do_action( 'bbp_template_after_topics_loop' ); ?>
<?php bp_get_template_part( 'activity/activity-loop' ) ?>
<?php endif;?>
<?php endif;?>
Hi George,
Delete all that code and put this in your file<?php $forum_ids = bbp_get_group_forum_ids( bp_get_current_group_id() ); $forum_id = 0; if ( ! empty( $forum_ids ) ) { $forum_id = (int) is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids; } ?> <?php if ( $forum_id && bbp_has_topics( array( 'post_parent' => $forum_id ) ) ) : ?> <?php bbp_get_template_part( 'loop', 'topics' ); ?> <?php endif; ?>
That will work and I have tested it. you will need to do the css though.
Hope that helps.
My next ask is more complicated I think. What is the best way of creating a new Tab in each group called Info, which is effectively a post, where they can put text, photo’s, video links etc, to give the group a significant additional information page?
I’d ideally like the group admins to fill-out the basics of this page during group creation but for now I’d be happy with just the tad and editable page.
Do you have any ideas? Group extras would allow group admins to create a new page but I’d like every group to have the same page tab name and make it a universal aspect of all groups with the Admin only having the option to fill it with info or leave it blank.
I’ll do some googling to see if there are other solutions.
Hi George,
did you find some solution? The only way I see it is using Group Extension API and create one.No I didn’t, I found some information on creating an additional tab but that seemed pretty complex and did not provide me with the admin editable page.
How about if I manually set up the page using BP Group Extra’s and make sure the slug is the same for all groups. It’s not ideal but could we pull it’s content into the front.php output?
That is the problem. None of the existing solution will allow you to do a visual editing from front end. The existing Visual editors are not integrated.
So, the better approach is like adding a page from Dashboard but that takes away the rights from Group admins.
If you go with Group extras, yes, It will be possible to fetch that page content on front page.
You must be logged in to reply to this topic.