Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change “Freshness” to show topic creator

  • @dreamsync

    Participant

    Hi there,

    I have a community that has been providing feedback that it is confusing to them when it shows the last poster rather than the person who started the topic.. I am assuming there is a simple bit of code that can help me with this, but I am no php expert..

    Ideally, Id like to change the Freshness column to a Creator column that shows who created the topic.. See example: http://imgur.com/Wv0FnQr

    Thanks in advance 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • @rayjay

    Participant

    Make a child theme of the bbpress first.

    Then you need to edit the loop-single-topic.php file in your child theme to move the code below to replace the other code on the bottom..

    		<?php do_action( 'bbp_theme_before_topic_meta' ); ?>
    
    		<p class="bbp-topic-meta">
    
    			<?php do_action( 'bbp_theme_before_topic_started_by' ); ?>
    
    			<span class="bbp-topic-started-by"><?php printf( __( Started by: '%1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>
    
    			<?php do_action( 'bbp_theme_after_topic_started_by' ); ?>
    
    			<?php if ( !bbp_is_single_forum() || ( bbp_get_topic_forum_id() !== bbp_get_forum_id() ) ) : ?>
    
    				<?php do_action( 'bbp_theme_before_topic_started_in' ); ?>
    
    				<span class="bbp-topic-started-in"><?php printf( __( 'in: <a href="%1$s">%2$s</a>', 'bbpress' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span>
    
    				<?php do_action( 'bbp_theme_after_topic_started_in' ); ?>
    
    			<?php endif; ?>
    
    		</p>
    
    		<?php do_action( 'bbp_theme_after_topic_meta' ); ?>

    replace the abvoe code with below code..

    		<?php do_action( 'bbp_theme_before_topic_freshness_link' ); ?>
    
    		<?php bbp_topic_freshness_link(); ?>
    
    		<?php do_action( 'bbp_theme_after_topic_freshness_link' ); ?>
    
    		<p class="bbp-topic-meta">
    
    			<?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
    
    			<span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span>
    
    			<?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?>
    
    		</p>

    @dreamsync

    Participant

    Awesome thanks for the help! I just followed your instructions, and it didnt quite seem to work. It definitely did something, but not quite what was expected. Here’s a screenshot of what happened after i implemented your code: http://imgur.com/Txu9cAz

    After seeing the bbpress.org forums, im realizing its not totally neccessary to replace the freshness (last post) column, but to simply add a “started by: author” section directly beneath the topic title – just like on the forums here.

    Is that how it should look by default? Or are the bbpress.org forums customized?

    @dreamsync

    Participant

    Ah, got it! The theme creator had commented out the theme_before_topic_meta section of the template file. All fixed now! thanks 🙂

    @rayjay

    Participant

    Sorry I was off line during the holidays..

    Glad to hear you have sorted it now..

    It is usually better to have a copy of the orginal code with you if you hava customized theme for comparison and help recevied from here and most of the help you would get here would be based on the default plugin code and theme..

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