Unwanted behaviour: add_filter also processes widget contents!
-
I am filtering the_content to add some stuff to page/post content before displaying it. Problem is, widgets that display content excerpts (like Recent Posts, for example) are ALSO getting filtered and my content added on, which is not desirable. Seems simple, but I can’t seem to work around that. Should I be filtering something else, and not the_content, or is there some way to check if we are in a widget and not filter the content, like is_widget (doesn’t exist that I know of)?
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Unwanted behaviour: add_filter also processes widget contents!’ is closed to new replies.