When I put
<div id="bbpress-forums" data-topic-id="<?=bbp_get_topic_id()?>">
to the template, it prints me: data-topic-id=”0″.
When I put
<div id=”bbpress-forums” data-forum-id=”<?=bbp_get_forum_id()?>”>
to the template, it prints me: data-topic-id=”5080″, so it looks that ID for fetching topics is right.
bbp_has_topics() returns false 🙁
When I debuged WP_Query in bbpress/includes/topics/template.php on line 203, it prints:
SELECT SQL_CALC_FOUND_ROWS wp_2_posts.ID FROM wp_2_posts INNER JOIN wp_2_postmeta ON ( wp_2_posts.ID = wp_2_postmeta.post_id ) WHERE 1=1 AND wp_2_posts.post_parent = 5080 AND wp_2_posts.post_type = 'post' AND (wp_2_posts.post_status = 'publish' OR wp_2_posts.post_status = 'closed' OR wp_2_posts.post_status = 'private' OR wp_2_posts.post_status = 'hidden') AND (
wp_2_postmeta.meta_key = '_bbp_last_active_time'
) GROUP BY wp_2_posts.ID ORDER BY wp_2_postmeta.meta_value DESC LIMIT 0, 15
with post_type=post, but it should be post_type=topic. Damn.
probably either a theme or plugin issue
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
Then come back
Plugins – all plugins deactivated and still doesnt work 🙁
Themes – try to switch to TwentyEleven and works well.
I still dont know how to force post_type=topic to SQL query mentioned above.
talk to your theme provider