Gap/Space Between Category name and counter
-
Hello!
Use WooCommerce and thanks to developers!
I make sites in WordPress but I’m new in php. I have one problem.
It is necessary to display the categories of product (text) and after them the number of products in which category. I want to display the name category and quantity together and without spaces, but it doesn’t work out.I do not want to have a space between the category and the counter, because the counter some categories remain on the second or third line (for example, on the screenshot Кухонные гарнитуры)
Found the code in the file:
<h2 class=”woocommerce-loop-category__title”>
<?php
echo esc_html( $category->name );
if ( $category->count > 0 ) {
echo apply_filters( ‘woocommerce_subcategory_count_html’, ‘ <sup class=”count”>’ . esc_html( $category->count ) . ‘</sup>’, $category );
}
?>
</h2>Tried to use Trim and other php function but it didn’t help.
Could you help, please…- This topic was modified 5 years, 2 months ago by .
- This topic was modified 5 years, 2 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Gap/Space Between Category name and counter’ is closed to new replies.