In that case we can put the following
<?php if ( bbp_has_topics() ) : ?> //our loop code here.. <?php endif;?>
Please don’t forget the changes I mentioned.
Hi George,
Thank you for confirming.It won’t cause error but will list recent topics which is not a great thing to do.
The better strategy will be doing like
<?php if( ! empty( $forum_id) && bbp_has_topics( array( 'post_parent' => $forum_id ) ) ) :?> //show loop <?php endif;?>
Hope that helps.
Are you using my previous code to get the $forum_id before using the above snippet. If not, then that’s why It is happening.
I revert back to the previous working code and I’m getting some odd behaviour on wider testing, it seems the topic list is showing all topics for all forums. Previously I only had one group with a forum and a couple of test topics, so the topic list showed correctly. However now that I’ve set up a second group with a forum and test topic I can see that I am seeing all topics for both forums in the forum topic list on the group homepage.
Can you please post the code here( only till the bbp_has_topics() ) code block. No need to post the content inside the loop. Most probably you are not passing the forum id.
Hi George,
Please post the code. That will allow me to help you better.
You must be logged in to reply to this topic.