simonday
Forum Replies Created
-
yes I agree. I am using the short ode block already which is a shame as that would be an easy fix ??
it’s not just the <br> element as the styling is also not loading on initial page load, only when you click next month and it reloads…
I can’t see any styling on my or your version so dont know if it’s affecting that….
same way, 2 columns.
I can see yours don’t have the <br> tags
What’s your theme?
PHP version? I’m running 8.3
a PHP extension???
OK so I’ve made a new blank website, added the events plugin, added one event, added the shortcode for the mini calendar into a 2 column post page here: https://www.eventstest.sos-dev.co.uk/events/
Still has the spaces on initial page load.
I’ve done nothing else, it’s running 2024 theme.
So this is still a problem, I’ve duped the site, turned off all other plugins, set the theme to 2024 and also tried 2022 theme (which is running now).
Still got the paragraph and break tags but they reset when the calendar is re-loaded on clicking next month.
all styling is off.
https://chipwhe-aug24.sos-dev.co.uk/events/sat046pucklechurch/
Can you give me the exact code to add to the functions file to turn off the spaces as the
remove_filter( ‘the_content’, ‘wpautop’ );
remove_filter( ‘the_excerpt’, ‘wpautop’ );doesn’t seem to work?
also tried wpautop-control plugin but it’s years old and doesn’t work anyway.
I’ve also tried the following and had ‘events’ rather than ‘posts’ to no avail:
add_filter(‘the_content’, ‘disable_wpautop_for_custom_post_type’, 9);
function disable_wpautop_for_custom_post_type($content) {
if (get_post_type() === ‘posts’) {
remove_filter(‘the_content’, ‘wpautop’);
}
return $content;
}Hi Marcus, thanks for this – I can see what you mean when the page reloads without <br> or <p> tags. The problem however still persists.
I’ve added:
remove_filter( ‘the_content’, ‘wpautop’ );
remove_filter( ‘the_excerpt’, ‘wpautop’ );– I’m using a 2024 child theme and have added the remove_filter to the functions.php file but I dont think it’s targeting the plugin elements as it’s still loading with <br> and <p> tags.
Maybe the plugin is not part of the excerpt or content?
Can you give me a more specific code to target the calendar plugin element please?
Thanks
Forum: Themes and Templates
In reply to: I want to add class to the menu item link in wordpressno still waiting…