"the_content" filter is removed but NOT restored, on custom WP_Query
Hi. My site has a custom WP_Query (outside the main loop) in the header (in header.php), and another in the footer (in footer.php). On all/only my bbPress pages, the paragraph breaks in this content are missing, because wpautop is not applied as it normally is.
That’s because bbPress REMOVES THE FILTER “the_content”. I tracked it down to bbp_remove_all_filters( ‘the_content’ ); in bbpress/includes/core/theme-compat.php, line 633.
In that same file, I also see bbp_restore_all_filters(), which looks like it should fix the problem. But it’s not actually working on my custom queries.
So how can I apply bbp_restore_all_filters() to my custom WP_Query calls?
Thanks for any help here!
MY WORDPRESS INFO:
I also had a similar issue a month ago (http://bbpress.org/forums/topic/conflict-with-custom-wp_query-in-header-php/) where bbPress conflicted with these same WP_Query calls in my header and footer. But in that case, the main content from bbPress was REPLACING the content from my WP_Query. I somehow solved that problem by just changing my slugs. But I now see it was probably caused by add_filter( ‘the_content’, ‘bbp_replace_the_content’ );, also in this theme-compat.php file.
You must be logged in to reply to this topic.