Good day!
I have a massive magazine website I’ve just migrated from Divi to X Pro. Inside every post there's a sugestion to another post. And there’s a bit more than +10,000 posts in total, so this is not something editors can fix manually in every post. This element was added within the post content.
<blockquote>
<h3>Te sugerimos</h3>
<p class="entry-title"><a href="https://example.com/post-title/" target="_blank" rel="noopener noreferrer" style="outline: none;"><strong>POST TITLE</strong></a></p>
</blockquote>
It should be just an h3
tag, and then a p
tag without that entry-title
class, and ofcourse, without that blockquote
tag.
That code is just part of the posts. Back in the old Divi website, editors wrote posts normally using native WP WYSIWYG editor. It was Divi, for reasons I don’t know, that apply all this… styles? Anyway, everything passed on to this X-Pro-based website once I did the migration.
Here I check every post in WP WYSIWYG and they seems normal, and when I see any article online it has those big chunk of text. And it’s when I check HTML tab in post editor that I see all that garbage code.
In order to get rid of all that, I'm thinking about using REGEX, but honestly, I have no idea how to tell REGEX to delete every class="entry-title"
from a p
tag which is inside a blockquote
tag, which I would delete too but only if it has all those elements inside.
This would be a life saver. I'm going crazy here.
Thanks in advance!