Strip blank <p> tags from WordPress post Export

I’m trying to export all my posts in WordPress to integrate the same in HubSpot COS.

Though I have a some issues in formatting of posts.

Read More

There are a few <p>tags, which I want to strip.

Here’s a DOM screenshot of a post.

enter image description here

The <p> tags without any content needs to stripped off.

The issue I’m having in HubSpot is, HubSpot creates the entry excerpt as the first paragraph of the post. Since my first paragraph is blank there is no excerpt in HubSPot.

Thoughts on tackling this?

Related posts

Leave a Reply

2 comments

  1. Hubspot does not use the first paragraph as the excerpt

    You can select were you want your excerpt to end by going to the blog editor, moving your cursor to the line where you want your excerpt to end, then click

    Insert > Read More Separator

    Done