I am encountering more issues with the automatic <p> tag generation in my code. I tried clearing them and recovering the blocks, but the same issues keep appearing after editing. Could you please help me fix this?
When I checked the code editor, the <p>
tags were added like this:
Recently i discovered that there is a bug with wordpress 6.3 that generates <p> and </br> tags through my custom code and as a result my code is ruined.
I think this is a WordPress bug and not CodeWP bug but im not sure.
Examples :
WordPress 6.2 https://onlinewatersports.gr/area/attica/?post_types=locations the code that runs the leaflet map and gathers all the pins with a php query works fine.
https://ibb.co/5LG8CDJ
WordPress 6.3 https://staging.onlinewatersports.gr/area/attica/?post_types=locations the exact same code with the same setup not working. If you inspect the map element you will see the random <p> tags that are generated.
Any help will be appreciated! Thanks!
]]>I’m having a problem with the Latest Posts emails. The editor in the System Emails section is adding a ton of p and br tags, and the post thumbnail shortcode isn’t using the parameters I set, so it uses the full size image aligned left when I have large and center.
I have autop disabled in the_excerpt and the_content like so, so it only runs for posts…
tried to paste the code here, but this stupid block editor won't let me please keep this plugin compatible with WP4.9 and ClassicPress
Also, in Gmail, the two nested tables at the bottom of the email template get moved below the background table and aligned left. Don’t know if the injected p and br tags are causing that or not.
Thanks in advance, Sean
]]>remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_content', 'wp_autop' );
remove_filter( 'the_content', 'shortcode_autop' );
add_filter( 'the_content', 'shortcode_unautop', 100 );
“wpautop” not work
“wp_autop” either
The “autop” is broking a shortcode from my plugin and other plugins.
how disable “autop”?
]]><script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(event) {
jQuery( '#slider-pro-3-256' ).sliderPro({
//width
width: "100%",</p>
<p> //height
autoHeight: true,</p>
<p> //autoplay
autoplay: true,
autoplayOnHover: 'none',
autoplayDelay: 5000,</p>
<p> arrows: true,
buttons: true,
smallSize: 500,
mediumSize: 1000,
largeSize: 3000,
fade: true,</p>
<p> //thumbnail
thumbnailArrows: true,
thumbnailWidth: 120,
thumbnailHeight: 120,
thumbnailsPosition: 'bottom',
centerImage: true,
imageScaleMode: 'cover',
allowScaleUp: true,
startSlide: 0,
loop: true,
slideDistance: 5,
autoplayDirection: 'normal',
touchSwipe: true,
fullScreen: true,
});
});
</script>
The code have “<p>” inside, and obviously dont work. I add the code for remove the filter “autop” but dont work.
]]>wpautop
function.
For me, this is not an urgent issue. I’ll just leave the plugin deactivated until a future fix. I’m just posting this so the devs are aware of it.
]]>Well, at beginning the idea of WP was good: to create a platform where possible to edit a website quickly and with main structure pre-built.
But recently step by step the authors’ idea of implementation took a wrong direction: for me nowadays WP is made only for those people that is not able (or doesn’t want) to create a personal website with his own codes.
I used WP four times and everytime to speed up the job: of course modifying many areas with CSS, js, and some lines in functions.php (where necessary and not affecting the structure).
unfortunately the WP strategy changed in last two years: I see that site made in 2017 (and where luckily I rejected to update WP) still work well, even with style inside pages and some code lines.
F.E. the autop filter (and recently the author’s efforts to avoid the filter removal with code lines) is the most stupid invention.
This idea of autoformatting all what created by the “user author” is not only a complication but also an unfair way to deal with customers … of course it is good for all those guys that cannot add they codes and just want to write a blog in wording language: to be correct, WP authors should add an escape way per each one that is unwilling to use their filters, a clear and clearly explained chance to disable the new added filter.
What they consider an “advantage” must be an option and not an “imposition” for users: this moreover because we are talking of improvements coming with updates. I mean that “I didn’t know before the update, so I could not decide in previous if use that theme or not”.
And WP also cannot say “that we must accept because in part it is a free service” (!!) … free of charge or not, they are involving the users’ time, work and efforts: SO THEY CANNOT PLAY WITH USERS’ RIGHT that his work must be respected and NOT changed after months of job done and website published.
For me this matter is a serious illecit of customers’ rights.
Also the daily updates: dozens of updates coming, a “job” to pass and install them (of course, saw the bad consequences, checking all one by one, which takes time) … it seems a “new game, not so professional, like playing with facebook or social networks”, while web communication should be a serious and professional matter.
Moreover when (e.g. my case) the website is not a simple blog, but a comm. site of a corporate which has no time or intention to “play around codes like a sort of hobby”, but focus is the turnover and the salary of the staff …
What I mean is that a website is quite always something very serious, involving money, peoples’ job, day life … not an hobby.
For all these reasons I probably made a mistake to choose WP recently, but for now continuing, not at all satisfied but only because “forced by the fact that to rebuild the 4 websites it’d take a long time loss which I cannot afford”.
I will try to “arrange solutions” like today, that passing to the 5.2 ver. I lost my mod for “header widget” (in functions.php): why should I spend my Sunday to fight to keep safe my previous codes? Luckily we all have a backup.
I’m talking also in interest of all those guys that make the plugins, and generously offer them for free online: WP does not show respect for their jobs too … dozens of plugins are abandoned because of some incautious updates of WP authors.
The solution? They are indeed free to do what they wish with their creation, but they should be “morally obliged to offer to users the chance to backward to previous stable versions, and without annoying with obsessive alerts regarding UNDESIRED UPDATES”.
Thank you to have read my opinion.
Mauro A. Vicariotto
I tried many solutions but can’t disable wp auto formatting.
My WP: WordPress ver. 5.1.1, Twentyseventeen theme + Adbanced Twentyseventeen Child
Tried with following plugins:
– ignore-code.1.0: even if wrapping in [ignore-code], autoformatting is enabled
– disable-wp-auto-formatting: does not work, no panel to activate in pages
– toggle-wpautop.1.2.5: does not work, no panel to activate in pages
– dont-muck-my-markup: this is the only one that appears in page panels, but without effect
Tried with lines in wp-content/themes/twentyseventeen/functions.php:
remove_filter( ‘the_content’, ‘wpautop’ );
remove_filter( ‘the_excerpt’, ‘wpautop’ );
But without effect: wpautop still working.
I see that the filter is in wp-includes/formatting.php
and its javascript file is in wp-includes/js/autop.js, but of course cannot disable there, because
the whole structure of WordPress shouldn’t work in that case.
Also add that with ver. 1.4 of Twentyseventeen the problem was solved with simple plugin
“don’t muck my markup”, I have another site with old version and autop is disabled.
With latest (2.1) it seems impossible to disable autop.
Another info is that in this case I have a multilanguage site:
I read a post in which s/one told that with “WPGlobus” multilang plugin it was impossible
to disable autop in functions.php, and had to change some lines in plugin .php.
My case is different (I use Polylang) but it might be a similar problem … what do you say?
Or I can try to make a must use plugin to disable autop:
I have already made a MU-plugin for Polylang, to solve a problem to solve a compatibility
issue with WP-Sweep (wp_sweep_excluded_taxonomies …).
Or … I really don’t know … backwarding to previous versions? Crazy!
Thanks to all.
Mauro