Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I add space between two replies?

  • @wreckcox

    Participant

    I tried searching in the forum but didn’t find that suits my question so I am dropping it here. This might be very simple for some but for me, it’s little tricky. I am still a newbie.

Viewing 8 replies - 1 through 8 (of 8 total)
  • @robin-w

    Moderator

    so you want a space between each reply – yes ?

    If so, you will need to be able to FTP a file to your website – do you know how to do this?

    @wreckcox

    Participant

    Yes, Robin I want to add space between replies.
    I can add file using cpanel file manager as I am not familier with FTP.

    @robin-w

    Moderator

    ok,

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-replies.php
    Make a copy of this file to your pc

    The edit this file to add this line after line 50

    <div class='rew-spacer'> <p/> </div>

    so you end up with

    <?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
    
    <div class='rew-spacer'> <p/> </div>

    Then put this in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-replies.php

    You may need to do some styling to get it how you want it, but I would need to see your site to help on that

    @wreckcox

    Participant

    Thank you so much. This code added the space between replies but pushed the border below.

    @wreckcox

    Participant

    Thank you so much. This code added the space between replies.
    Can this also be done with css? If yes, how?

    @wreckcox

    Participant

    body.reply #bbpress-forums div.reply, #bbpress-forums .bbp-replies div.topic, #bbpress-forums .bbp-replies div.reply {
    margin: 0px 0px 40px 0px;
    }
    This did the work. Thank you.

    @robin-w

    Moderator

    ok, take the change above out.

    Then find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.php
    Make a copy of this file to your pc

    The edit this file to be this

    <?php
    
    /**
     * Replies Loop - Single Reply
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    ?>
    <div class='rew-border'>
    <div id="post-<?php bbp_reply_id(); ?>" class="bbp-reply-header">
    
    	<div class="bbp-meta">
    
    		<span class="bbp-reply-post-date"><?php bbp_reply_post_date(); ?></span>
    
    		<?php if ( bbp_is_single_user_replies() ) : ?>
    
    			<span class="bbp-header">
    				<?php _e( 'in reply to: ', 'bbpress' ); ?>
    				<a class="bbp-topic-permalink" href="<?php bbp_topic_permalink( bbp_get_reply_topic_id() ); ?>"><?php bbp_topic_title( bbp_get_reply_topic_id() ); ?></a>
    			</span>
    
    		<?php endif; ?>
    
    		<a href="<?php bbp_reply_url(); ?>" class="bbp-reply-permalink">#<?php bbp_reply_id(); ?></a>
    
    		<?php do_action( 'bbp_theme_before_reply_admin_links' ); ?>
    
    		<?php bbp_reply_admin_links(); ?>
    
    		<?php do_action( 'bbp_theme_after_reply_admin_links' ); ?>
    
    	</div><!-- .bbp-meta -->
    
    </div><!-- #post-<?php bbp_reply_id(); ?> -->
    
    <div <?php bbp_reply_class(); ?>>
    
    	<div class="bbp-reply-author">
    
    		<?php do_action( 'bbp_theme_before_reply_author_details' ); ?>
    
    		<?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
    
    		<?php if ( bbp_is_user_keymaster() ) : ?>
    
    			<?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?>
    
    			<div class="bbp-reply-ip"><?php bbp_author_ip( bbp_get_reply_id() ); ?></div>
    
    			<?php do_action( 'bbp_theme_after_reply_author_admin_details' ); ?>
    
    		<?php endif; ?>
    
    		<?php do_action( 'bbp_theme_after_reply_author_details' ); ?>
    
    	</div><!-- .bbp-reply-author -->
    
    	<div class="bbp-reply-content">
    
    		<?php do_action( 'bbp_theme_before_reply_content' ); ?>
    
    		<?php bbp_reply_content(); ?>
    
    		<?php do_action( 'bbp_theme_after_reply_content' ); ?>
    
    	</div><!-- .bbp-reply-content -->
    
    </div><!-- .reply -->
    </div>
    
    <div class='rew-spacer'><p/> </div>

    Then put this in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-reply.php

    Finally in your theme’s custom css area put

    
    #bbpress-forums ul.bbp-replies {
    border : none ;
    }		
    
    .rew-border {
    border: 1px solid #eee;
    }		

    @robin-w

    Moderator

    cross posted with yours, both solve the issue, so go with yours

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