used this code and that did not worked for me.
echo str_replace( "<br>", "", wp_list_categories(array('title_li' => false, 'style' => false)));
what did I missed?
used this code and that did not worked for me.
echo str_replace( "<br>", "", wp_list_categories(array('title_li' => false, 'style' => false)));
what did I missed?
You can replace '<br>' with '' by setting separator value
echo wp_list_categories(array('title_li' => false, 'style' => false, 'separator' => ''));
Please use below code it will help you
$args = [
'style' => 'none',
'separator' => '', // <-- Removes the default one
];
wp_list_categories( $args );