• “Topics for Posts” work fine when the plugin “bbPress Threaded Replies” is disabled, but when is enable it show only the topic repeated egual for a number of times egual to the total number of replies.

    Looking to the code of “Topics for Posts” I see this call
    echo bbpress()->shortcodes->display_topic(array('id'=>$bbp_post_topics->topic_ID));
    to show the topic replies that work correctly if the plugin “bbPress Threaded Replies” is disabled.

    I have fixed the problem with with this patch to your plugin

    if you modify the file
    bbpress-post-topics/templates/comments-bbpress.php
    under the line
    /** bbPress 2.1.x */

    change the code inside the else with:

    $bbp = bbpress();
    			echo $bbp->shortcodes->display_topic( array( 'id' => $bbp_post_topics->topic_ID ) );
    			wp_reset_postdata();
    			#echo bbpress()->shortcodes->display_topic(array('id'=>$bbp_post_topics->topic_ID));

    https://www.ads-software.com/extend/plugins/bbpress-post-topics/

Viewing 4 replies - 1 through 4 (of 4 total)
  • You may have to wait until threaded replies becomes a core functionality, which is scheduled for bbPress 2.4.

    Since the plugin might undergo some changes before going into core, putting in extra time to support it now might be considered too wasteful.

    I’d love it if bbPress Topics for Posts could go into core eventually too though…

    Erlend – Haha! I’d like that too.

    @robyinno72 – As a quick test I dropped some loop-based template functions in the comments-bbpress.php file after the shortcode call, and there was no difference whether I ran wp_reset_postdata() or not. That being said, this wouldn’t be the first time I’ve had to reset the loop with this plugin to fix a bug. I’ll have to do some more testing to make sure it doesn’t break something else.

    Did instantiating bbpress() into $bp before the shortcode call make a difference?

    p.s. regarding “topics for posts” in core, JJJ appears to be interested. You should get in touch ??

    Thread Starter Roberto Innocenti

    (@robyinno72)

    David Dean, yes if I remember well was instantiating bbpress() into $bp that made the difference.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘not compatible with plugin "bbPress Threaded Replies"’ is closed to new replies.