There’s no new update yet so we’re wondering if there will be incoming fix on the said issue.
Appreciate any response. Thank you.
]]>Without the plugin activated, everything is fine – no extra lines/p-tags.
I’m using Woocommerce & Storefront, the collapsable content is Woof Product Filter.
Thanks and Best Regards,
Ryan
I use a combination of plugins.
– Advanced Custom Fields (ACF)
– XYZ PHP snippets
– WPbakery (pagebuilder)
my issue is those Ptag cropping up everywhere, i’m losing my mind over it!!!
so…
step 1- i set up a ACF content/fields
step 2- create my php snippet, like below as you can see NO P TAGS
<div class=the-stakes-hero-outer><div style="color:<?php the_field('the_problemstakes_text_colour', 'option'); ?>" class="the-stakes-hero"><div class="os-titles the-stakes-title"><?php the_field('the_problemstakes_statementtitle', 'option'); ?></div><?php the_field('the_problemstakes_text', 'option'); ?></div><div class=the-stakes-image><?php the_field('the_stakes_image', 'option'); ?></div></div>
step 3- insert my php snippet shortcode into my page via text block from Wpbakery, like below
[xyz-ics snippet="The-Stakes-layout2"]
now this is where those P TAGS start to appear!!!
Once the shortcode is render on the page P TAGS get added WHY OH WHY OH WHY, why does this happen? how do i stop it?
this issue had been driving mad for 5 years!!! this is my second post about it
I have tried adding in, in a ton of different ways this code, IT DOES NOT WORK
// Prevent WP from adding <p> tags on pages
function disable_wp_auto_p( $content ) {
if ( is_singular( 'page' ) ) {
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
}
return $content;
}
add_filter( 'the_content', 'disable_wp_auto_p', 0 );
]]>after updating to WordPress 5.7, empty spaces have been created between paragraphs.
Comparing the old CSS with the one after the update I noticed that before where it was: <p></p> now is added <p>:: before</p>.This causes an empty space of 15px or 20px.
Inspecting the code after the update, it adds:
p: empty: before {
content: “”;
}
Disabling this code from the Chrome console fixes the problem. How to intervene to resolve it definitively?
Thanks
]]>i have been using wordpress for about 5 years now.
and I am struggling to stop it add P Tags to everything. it ruins every design i create and causes so so so many issues.
I feel like i have tried EVERYTHING, i repeat EVERYTHING.
I have try using various bits of code in the PHP functions file;
remove_filter(‘the_content’, ‘wpautop’); < this NEVER EVER EVER WORKS EVER FACT
(should the above code work on a Custom Post Types?? even though i doesn’t work on anything anyway)
I have used plugins to try and remove the ptags, DOES NOT WORK.
I added Advanced Tiny MCE, it tells me there is an invisible “p tag” present BUT i STILL CANNOT REMOVE IT
as you can probably tell i am absolutely bored stupid of this issue, i have been fighting it for years and years.
PLEASE SOMEONE HELP
it is driving me insane.
thank you
]]><div class="wpem-venue-short-info"><?php printf( __('%s', 'wp-event-manager'), get_venue_description($venue_id) ); ?></div>
Only site admins will be adding data to the site, so it’s not a risk to have full html or even basic html though.
How do I override for both Organisers and Venues display to full html output; or how do I change the above code or do I need to add something to my functions file to allow html elements such as
<br>,<em>,<i>,<ul>,<ol>,<li>,<a>,<p>,<img>,<h3>,<hr>
etc.
Thanks
]]>i’m working on a site and wish to stop those damn “P tags” getting added to the content.
so far i have tried:
installing wpautop plugin <— this did nothing
I added this code to function.php:
remove_filter( ‘the_content’, ‘wpautop’ );
remove_filter( ‘the_excerpt’, ‘wpautop’ );
<— this did nothing
then i tried adding this code to function.php:
function simonbattersby_shortcode_format($content){
$content = preg_replace('/(<p>)\s*(<div)/','<div',$content);
$content = preg_replace('/(<\/div>)\s*(<\/p>)/', '</div>', $content);
return $content;
}
add_filter('the_content','simonbattersby_shortcode_format',11);
<— this did nothing
my only solution is to use “raw html” block instead of a “text block”
this problem has been around waaay too long, seriously.
this image may help explain https://homesearchproperties.com/wp-content/uploads/2020/08/Screenshot-hsp.jpg
any help? please?
]]>Does anyone have any suggestions? The pages look really bad without those p tags. And it’s seems really odd that it would be so contrary about the one page.
]]>