WordPress 6 breaks the calendar?
-
I see various people complaining about the wpautop filter over the years, and some various fixes, and some complaining certain plugins in combination with the-events-calendar (like https://theeventscalendar.com/support/forums/topic/conflict-with-toggle-wpautop-plugin-makes-community-events-unusable/ ) but I don’t have that plugin installed.
I tried putting:
remove_filter( 'the_content', 'wpautop' ); function tsl_remove_autop($post){ // remove wpautop for tribe community events // without this extra <p> tags are generated in these pages by wordpress? Another plugin? remove_filter('the_content', 'wpautop'); remove_filter('the_excerpt', 'wpautop'); } add_action( 'the_post', 'tsl_remove_autop', 1);
but I can’t get the stray <p> tags to be removed from the events page.
I assume it has something to do with upgrading to WordPress 6, but I also upgraded a bunch of stuff at the same time – I hadn’t noticed the problem on my dev site.
The only way I can fix it is to modify wpautop() to return $text as soon as it starts, and that fixes it.
The advice from the wordpress developers is that plugins shouldn’t be putting spaces and newlines into their template code…. That doesn’t really seem like a reasonable solution to me, and I don’t know if there is some conflict with another plugin or not.
I see in your Overwrite.php that you say this->wpautop isn’t needed any more, but I wonder if it still is.
Any suggestions on how to make your code work without disabling wpautop for everywhere?
The page I need help with: [log in to see the link]
- The topic ‘WordPress 6 breaks the calendar?’ is closed to new replies.