
Hi Olaf,
Beans uses WordPress Core functions where possible, for instance it uses get_the_category_list()
and get_the_tag_list()
to display the post categories and tags. Below is a snippet using the WP Core filters to replace the comma separators with spaces:
add_filter( 'the_category', 'example_categories_output', 10, 2 );
/**
* Modify the list of categories.
*
* @param array $thelist List of categories for the current post.
* @param string $separator Separator used between the categories.
*
* @return string The list of categories.
*/
function example_categories_output( $thelist, $separator ) {
return str_replace( $separator, ' ', $thelist );
}
add_filter( 'the_tags', 'example_tags_output', 10, 3 );
/**
* Modify the list of tags.
*
* @param string $tag_list List of tags.
* @param string $before String to use before tags.
* @param string $sep String to use between the tags.
*
* @return string The list of tags.
*/
function example_tags_output( $tag_list, $before, $sep ) {
return str_replace( $sep, ' ', $tag_list );
}
Happy coding,