Hi,
I need to remove the bracktes around the post count in my sidebar for the “Filter Products by Attributes” widget.
I tried this two codes in my child functions.php but only worked for other filters.
function categories_postcount_filter ($variable) {
$variable = str_replace(’(’, ’ ‘, $variable);
$variable = str_replace(’)’, ’ ', $variable);
return $variable;
}
add_filter(‘wp_list_categories’,‘categories_postcount_filter’);
function archive_postcount_filter ($variable) {
$variable = str_replace(’(’, ’ ‘, $variable);
$variable = str_replace(’)’, ’ ', $variable);
return $variable;
}
add_filter(‘get_archives_link’, ‘archive_postcount_filter’);
As you can see by the picture, the fix worked fine but not for all the widgets.
Could you please help me? I know it’s easy but I can’t find anything about it on google and I’m not a web developer
Thanks in advance
P.S.: I’ll attache username and password in a secure note, in case you need to check the site