ok can you say which lines should do what?
ok,
can you say which lines in loop-single-topic you need which in?
I need the filtered freshness date after the topic title and the ‘since’ freshness link after the reply count.
In my loop-single-topic.php it should go in line 105, but I already modified the file.
Does this actually matter?
Could you tell how I could deactivate the filter for a certain topic_freshness_link?
ok so leave in the code that you have – that will make the default into date
then add this
function rew_forum_freshness_link( $forum_id = 0) {
echo rew_get_forum_freshness_link( $forum_id );
}
function rew_get_forum_freshness_link( $forum_id = 0 ) {
$forum_id = bbp_get_forum_id( $forum_id );
$active_id = bbp_get_forum_last_active_id( $forum_id );
$link_url = $title = '';
if ( empty( $active_id ) )
$active_id = bbp_get_forum_last_reply_id( $forum_id );
if ( empty( $active_id ) )
$active_id = bbp_get_forum_last_topic_id( $forum_id );
if ( bbp_is_topic( $active_id ) ) {
$link_url = bbp_get_forum_last_topic_permalink( $forum_id );
$title = bbp_get_forum_last_topic_title( $forum_id );
} elseif ( bbp_is_reply( $active_id ) ) {
$link_url = bbp_get_forum_last_reply_url( $forum_id );
$title = bbp_get_forum_last_reply_title( $forum_id );
}
$time_since = bbp_get_forum_last_active_time( $forum_id );
if ( !empty( $time_since ) && !empty( $link_url ) )
$anchor = '<a href="' . esc_url( $link_url ) . '" title="' . esc_attr( $title ) . '">' . esc_html( $time_since ) . '</a>';
else
$anchor = esc_html__( 'No Topics', 'bbpress' );
return apply_filters( 'rew_get_forum_freshness_link', $anchor, $forum_id, $time_since, $link_url, $title, $active_id );
}
and where you want to show a ‘since’ freshness link change
bbp_forum_freshness_link()
to
rew_forum_freshness_link()
You should put any amended templates into your child theme
come back if you don’t know how to do that
It works!
Thanks a lot Robin W!
Great – glad you are fixed