How do I add space between two replies?
-
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.
-
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?
Yes, Robin I want to add space between replies.
I can add file using cpanel file manager as I am not familier with FTP.ok,
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %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 pcThe 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.phpYou 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
Thank you so much. This code added the space between replies but pushed the border below.
Thank you so much. This code added the space between replies.
Can this also be done with css? If yes, how?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.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 pcThe 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.phpFinally in your theme’s custom css area put
#bbpress-forums ul.bbp-replies { border : none ; } .rew-border { border: 1px solid #eee; }
cross posted with yours, both solve the issue, so go with yours
- You must be logged in to reply to this topic.