I need to display more than one color in my titles in Wordpress. For this, I add one or more '##' in the title, and have a filter attached to the "the_title" hook that swaps it for a or , thereby allowing the user to highlight multiple words in the title.
This works fine, except I simply strip the '##' strings in places like the post list.
I am looking for a way to ascertain whether the title is being called for display in a widget, because I need to strip the '##' string there too, but I cannot find out how to.