I'd like to be able to use


within my Category Title in Wordpress but the admin strips them out.

I realise I can make the whole title bold using css but I only want it to apply to certain words.

Is there a way of enabling this?

Thanks for any help in advance.

  • How and in what part of the theme are categories being displayed?
    – brasofilo
    Commented Nov 1, 2013 at 14:20

1 Answer 1


I am not sure if you can force the system to accept markup in the category titles, and I am not sure you should even try so I am going to suggest that you hack together a kind of markdown. Use some character like * as a placeholder then...

  function($categories) {
    $pattern = '|(\*)([^\*]+)(\*)|';
    return preg_replace($pattern,'<b>$2</b>',$categories);

I am not sure how robust that is. I am sure the callback could be much better but it works when I test it.

Also, a lot depends on how you are displaying the categories. I am not even sure if that is the filter you need. Your questions does not provide that information.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.