Use in_the_loop() to ensure that only the single post in the main query is filtered

Fixes problem where a secondary loop would also be filtered if `the_content()` was called inside of it.