I’d be fairly sure that it’s because a topic and replies are shown using loop-single-reply.php which uses the reply class throughout.
I suspect that the topic class is used in /topics display
http://www.mysite.com/topics
you could prove this by typing the above (with your site name!) into your url box.
If so, then you could put a conditional into loop-single reply using the $countr we out there earlier, ie if it’s the first use topic class.
Is it possible to remove topic-author, but keep reply-authors
I’m just on my way out, or I’d do a bit more research – come back if you need more help !
Thanks Robin! Once again you led me down the correct path. I might post a much more difficult question next, so if you are still willing I would love your continued help. In the event that someone else needs this solution, below is my entire content for loop-single-reply.php. I inserted comments for the if and else statements to hopefully make it self-explanatory. Cheers!
<?php
/**
* Replies Loop - Single Reply
* Modified by Jerry for the Book Review site
* need the global $countr variable for use below,
* which is incremented in loop-replies.php
* @package bbPress
* @subpackage Theme
*/
global $countr;
/* this variable $countr is incremented in loop replies with the following code:
while ( bbp_replies() ) : bbp_the_reply(); $countr++; the $countr variable is set
to zero $countr=0;, before the while loop. */?>
<?php //Adding an if statement to show reply headers ONLY for reviews, not for initial topic
if ($countr > 1) { ?>
<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(); ?> --> <?php } //this is the closing bar for the if statement
//this display the word Description where normally the title bar would be, then the else statement is
//what displays the word Description
else { ?> <center><strong><span style="font-size: 14px"; >Description </span></strong></center> <?php } ?>
<?php if ($countr > 1) { /* this if statement is to separate css class replies from topics */ ?>
<div <?php bbp_reply_class(); ?>>
<div class="bbp-reply-author">
<?php do_action( 'bbp_theme_before_reply_author_details' ); ?>
<?php /*commented out by Jerry - this was for trouble-shooting purposes echo 'countr is ' . $countr; */?>
<?php if ($countr > 1) 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 -->
<?php }
else { /* this else statement is to separate css class topics from replies. The below
class calls and div classes were changed from reply to topic or content as required. */ ?>
<div <?php bbp_topic_class(); ?>>
<div class="bbp-content-author">
<?php do_action( 'bbp_theme_before_content_author_details' ); ?>
<?php /*commented out by Jerry - this was for trouble-shooting purposes echo 'countr is ' . $countr; */?>
<?php if ($countr > 1) bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
<?php if ( bbp_is_user_keymaster() ) : ?>
<?php do_action( 'bbp_theme_before_content_author_admin_details' ); ?>
<div class="bbp-reply-ip"><?php bbp_author_ip( bbp_get_reply_id() ); ?></div>
<?php do_action( 'bbp_theme_after_content_author_admin_details' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_theme_after_content_author_details' ); ?>
</div><!-- .bbp-content-author -->
<div class="bbp-topic-content">
<?php do_action( 'bbp_theme_before_topic_content' ); ?>
<?php bbp_topic_content(); ?>
<?php do_action( 'bbp_theme_after_topic_content' ); ?>
</div><!-- .bbp-topic-content -->
</div><!-- .content--> <?php } ?>
I should also mention, for anyone who finds this useful, that I made these changes within my theme files, not within the core bbpress files. Any changes made to the core bbpress files will likely be lost on an upgrade.
Brilliant – thanks for posting the solution, I’ve saved it away in my file of useful bbpress stuff !
more difficult question now expected !
Not sure I asked !!!, but will take a look tomorrow – wine and steak currently await !
Very nice! I had wine and steak last night. We will probably get snipped at for chatting on these boards, so I’ll stop now. Thanks again for your help today.