How to remove (0,0) in sub forum listings?
-
I’ve googled and searched the support forums and it seems the answers are outdated and don’t currently work on this version of bbPress.
I’ve read https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/ among other tips.
Any help?
-
do you just want to remove (0,0) ie not (1,2)?
I want to remove both. I just do not want it listed there.
not sure why
I’ve read https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/ among other tips.
isn’t working for you?
Nope. I copied all that into my functions and it didn’t work. I’ve googled other solutions which are along the same lines but different code that’s used. I figured it was cause that was outdated and bbPress version is different.
No other solution?
no that one still works!
So if I copy and paste this into my functions.php it should remove the (0,0) right?
function remove_counts() {
$args[‘show_topic_count’] = false;
$args[‘show_reply_count’] = false;
$args[‘count_sep’] = ”;
return $args;
}
add_filter(‘bbp_before_list_forums_parse_args’, ‘remove_counts’ );Am I missing something else to do?
I paste that into my functions.php and it doesn’t remove the (0,0). I’m wondering if I’m missing a step.
ok, the last line has a wrong “‘” type
replace this with
add_filter('bbp_before_list_forums_parse_args', 'remove_counts' );
and it should be fine
Hi Robin,
It still didn’t work for me. In the instructions it says:
Change loop-single-forum.php
Put the following into your functions file
function remove_counts() {
$args[‘show_topic_count’] = false;
$args[‘show_reply_count’] = false;
$args[‘count_sep’] = ”;
return $args;
}
add_filter(‘bbp_before_list_forums_parse_args’, ‘remove_counts’ );What are you suppose to change in the loop-single-forum.php? Changes are made to the child theme function file right when it talks about function.php?
Btw I’m not sure why the paste shows the improper type, in the actual code I paste into the function.php it looks like the correction you gave me.
I read this: https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum-part-3/
and placed the same code into the loop-single-forum.php but it has an error.
i’ve put it in multiple function.phps and still have an issue.
STOP !!!
Ok, the codex has a couple of errors as it had not been updated following the release of 2.5.4 and also had some text that had been badly edited.
You have two choices – you cannot do both
either
which I have just updated with new code, or put this in your functions file
function remove_counts() { $args['show_topic_count'] = false; $args['show_reply_count'] = false; $args['count_sep'] = ''; return $args; } add_filter('bbp_before_list_forums_parse_args', 'remove_counts' );
Both work
Hrmm I’ve tried both methods and neither end up working for me. I’ve also tried it on my theme and one of the default themes. It all makes sense but it doesn’t seem to work for me.
Really appreciate the help Robin, any other ideas?
Presume you have tried the new code?
Yes. But that code is exactly the code I already had in my functions.php.
For some reason when I paste in this thread it changes certain things like ” to “.
Yes. But that code is exactly the code I already had in my functions.php.
if so you haven’t tried the new code ! re-read the documentation
I have tried the new code. What I’m saying is that even though the pastes in here look wrong, it’s not. It’s because i’m not using “code” in here that it formats it.
I’ve copy pasted the code you provided, which was what I was using before (I just pasted it without “code”) here.
I’ve literally spent hours trying to fix this solution.
function remove_counts() { $args['show_topic_count'] = false; $args['show_reply_count'] = false; $args['count_sep'] = ''; return $args; } add_filter('bbp_before_list_forums_parse_args', 'remove_counts' );
I’ve been pasting that since the beginning. It’s at the bottom of my child theme’s function.php.
I have a developer that has been trying the same code on his test site without it removing the reply/topic counts either.
ok, all I can suggest is a conflict with another plugin or your theme
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
I’ve tried it on a fresh install. I’ve tried it on my site while changing to a default theme and I have same issue.
Weird thing now too is I have a sandbox and a main site and when I do sub forums one has them side by side, the other on top of each other. Same versions of theme and bbpress… why would it do that?
- You must be logged in to reply to this topic.