jhumphries82
Forum Replies Created
-
Right, I’ve managed to get to the bottom of this myself and thought I should share in case anyone else encounters similar problems…
I found this code in the UM plugin that clear as day shows why I’m experiencing this problem:
ultimate-member/includes/core/class-shortcodes.php: 203 function is_um_page() { 204 if ( is_ultimatemember() ) { 205 remove_filter( 'the_content', 'wpautop' ); 206 } 207 }
I assume there is a good reason for removing the filter but obviously I don’t want it to affect other areas of the page (i.e. my sidebar) so I added the following before my sidebar content:
if ( is_ultimatemember() ) { add_filter( 'the_content', 'wpautop' ); }
and then after my sidebar content:
if ( is_ultimatemember() ) { remove_filter( 'the_content', 'wpautop' ); }
Problem solved!
I also encountered the exact same problem with bbPress (which helped me find the above solution) and this post was my saviour:
https://bbpress.org/forums/topic/the_content-filter-is-removed-by-not-restored-on-custom-wp_query/
So I just called
bbp_restore_all_filters('the_content',0);
before my sidebar and thenbbp_remove_all_filters();
afterwards. Simples ??- This reply was modified 6 years, 4 months ago by jhumphries82.
Hi,
Further to my previous post, I’ve now reinstalled the default Twenty Seventeen theme and the problem persists. See screenshot:
Looks like it must be a UM bug? I’ve disabled all other plugins and am running the latest version of WordPress.
Thanks
JulianThanks for the reply ??
I haven’t tested it on the default theme, but I’m not using any other plugins and I’m using a very basic clean https://underscores.me/ theme that I’ve tweaked myself. I’m certainly not using any visual/page editors – just the default WordPress editor. Is it perhaps something hidden away in Underscore themes causing the problem?
Thanks
Julian