Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I remove the (0,0)

Viewing 9 replies - 1 through 9 (of 9 total)

  • Robkk
    Moderator

    @robkk

    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;
    }

    demonboy
    Participant

    @demonboy

    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;
    }

    demonboy
    Participant

    @demonboy

    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!


    Anonymous User 13893444
    Inactive

    @anonymized-13893444

    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.


    Anonymous User 13893444
    Inactive

    @anonymized-13893444

    Someone please reply..


    demonboy
    Participant

    @demonboy

    Read the thread…


    mica123
    Participant

    @mica123

    @sumanthbhe
    copy this code into your functions.php file – preferably in your child theme.


    Anonymous User 13893444
    Inactive

    @anonymized-13893444

    It worked.
    But how to remove comma, between the Forum topics


    Robkk
    Moderator

    @robkk

    @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;
    }
Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar