Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reddit style forum


  • OSCOWP
    Participant

    @oscowordpress1

    Hi guys!

    Is there any possibility to put the reply editor above all the replies like Reddit instead of having it under all the replies?

    Is there any plug in that allow me to change the location of the reply box?

Viewing 4 replies - 1 through 4 (of 4 total)

  • OSCOWP
    Participant

    @oscowordpress1

    Hi?


    Robin W
    Moderator

    @robin-w

    link to your site?


    webcreations907
    Participant

    @webcreations907

    Hello,

    Easiest way would be to override the bbpress’s content-single-topic.php file and move bbp_get_template_part( 'form', 'reply' ); to above bbp_get_template_part( 'loop', 'replies' ); within that file.

    For another option, I’ve tried the below on a few different themes without any issues. You’d add the below code to your theme’s functions.php file. Best if you add to child theme so that you don’t have to re-add if you update your theme, same would apply for the first option above.

    
    
    if ( !function_exists( 'oscowordpress1_move_bbpress_reply_form_filter' ) ) {
    	function oscowordpress1_move_bbpress_reply_form_filter( $template , $slug , $name ) {
    
    		if ( is_array( $template ) && in_array( 'form-reply.php', $template ) ) {
    			remove_filter( 'bbp_get_template_part', 'oscowordpress1_move_bbpress_reply_form_filter', 10 );
    			return array();
    		}
    
    		return $template;
    	}
    }
    
    if ( !function_exists('oscowordpress1_move_bbpress_reply_form')){
    	function oscowordpress1_move_bbpress_reply_form( $slug, $name ){
    
    		if ( isset( $name ) && $name == 'replies' ) {
    			bbp_get_template_part( 'form', 'reply' );
    			add_filter( 'bbp_get_template_part', 'oscowordpress1_move_bbpress_reply_form_filter', 10, 3 );
    		}
    	}
    	add_action( 'get_template_part_loop', 'oscowordpress1_move_bbpress_reply_form', 10 ,2 );
    }
    
    

    Best of luck, and hope one of those work out for you. 🙂


    harshalone
    Participant

    @harshalone

    I would love to see something like reddit please

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar