I think this should do it. If it does not change the word before in the filter to after.
add_filter('bbp_before_list_forums_parse_args', 'ntwb_bbpress_list_forums' );
function ntwb_bbpress_list_forums() {
$args['show_topic_count'] = false;
$args['show_reply_count'] = false;
return $args;
}
Hi Rob,
Thanks for this. Unfortunately if I add this to my functions.php Dreamweaver tells me there is a syntax error on lines 21 to 22 (which is the second and third lines in your code), and I don’t know php well enough to work out what’s wrong. My complete functions.php file, with your code, is this:
<?php
add_action( 'wp_enqueue_scripts', 'load_dashicons_front_end' );
function load_dashicons_front_end() {
wp_enqueue_style( 'dashicons' );
}
function bp_keep_user_private( $user_login, $user ) {
global $wpdb;
if( 'demo' === $user->user_login ) {
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->users SET user_status = 2 WHERE ID = %d", $user->ID ) );
}
}
add_action( 'wp_login', 'bp_keep_user_private', 10, 2 );
add_filter('bbp_before_list_forums_parse_args', 'ntwb_bbpress_list_forums' );
function ntwb_bbpress_list_forums() {
$args['show_topic_count'] = false;
$args['show_reply_count'] = false;
return $args;
}
Wait, scrap that. I’d copied the code from the email alert, not the forum. Guess it picked up incorrect syntax this way. Copied from the forum and it works a treat.
Thank you!
add_filter('bbp_before_list_forums_parse_args', 'ntwb_bbpress_list_forums' );
function ntwb_bbpress_list_forums() {
$args['show_topic_count'] = false;
$args['show_reply_count'] = false;
return $args;
}
where to copy this code?
someone please guide me.
@sumanthbhe
copy this code into your functions.php file – preferably in your child theme.
It worked.
But how to remove comma, between the Forum topics
@sumanthbhe
Try this to remove the comma.
add_filter('bbp_after_list_forums_parse_args', 'rkk_bbpress_list_forums' );
function rkk_bbpress_list_forums() {
$args['separator'] = '';
return $args;
}