Hi
I use this to automatically profixe my post titles depending on the category or the tag they are assigned.
It works fine, except for the menu items which are impacted too.
As one can see here : https://yogaazur.fr/cancer-nice-meditation/
or here : https://yogaazur.fr/tag/pranayama/
function my_modified_title($title, $id) {
if (in_category('evennement')) return '📌'.$title;
if (has_tag ('video')) return '▶️'.$title;
if (has_tag ('citation')) return '🗣'.$title;
if (has_tag ('meditation')) return '🧘🏻'.$title;
return $title;
}
add_filter('the_title', 'my_modified_title', 10, 2);
Does anyone see where this come from?
Thank you
Eric