In my plugin, when I filter ‘the_title’, I find that not only is the post title filtered, all the post titles in the sidebar are filtered as well. How do I only filter the ‘the_title’ in the current post?
O.K. I’ve figured it out. There’re only a handful of pages I need to do that for. So, what I did was to add in a token <!–newtitle–> to the title of those pages. Then I filter ‘the_title’ only when the <!–newtitle–> exists.
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘‘the_title’ – How to filter only in Post and Not in Sidebar?’ is closed to new replies.