Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Forum slow to load, show post form open then closes.


still giving
Participant

@nonegiven

Unfortunately it is not easy to post code to Buddypress but here goes … the answer is, it does not work. It does not fix it.

The Forum page STILL shows an open posting form which then closes to show the forums which looks bad and not professional at all. How can one load the forums first and the post form second?

To help others … this ‘fix’ edit requires commenting out the following line on /buddypress/bp-forums.php

// do_action( ‘bbpress_init’ );

from

function bp_forums_total_topic_count() {
do_action( ‘bbpress_init’ );

$query = new BB_Query( ‘topic’, array( ‘page’ => 1, ‘per_page’ => -1, ‘count’ => true ) );
$count = $query->count;
$query = null;

return $count;
}

The alternative offered is worse … it breaks the default template.

function bp_forums_total_topic_count() {
$query = new BP_Forums_Template_Forum;
$count = $query->total_topic_count;

return $count;
}

But, thanks, it is good to know that I am not stupid and I am coming across problems wiser people than I have encountered.

Skip to toolbar