Remove wrapping <p> from shortcodes only. (2 posts)

  1. Misamee
    Posted 7 years ago #

    I've searched almost everywher e(here in Google) and I've found several ways to remove <p> tags created by WordPress, but I don't want to remove all of them, actually. What I want to do is to remove/no-build them where add_filter('the_content',...) is used. Even better, when is used by a specific plugin.

    If I disable wpautop (providing that I know how to do it properly), I would remove or replace all <p> tags and I don't want to do that.

    This plug in uses a shortcode that is properly translated, but WP wraps around the HTML this annoying <p> that makes my HTML not valid: inside the <p> there is a main <div>, but a <div> inside a paragraph is not valid.

    Any solution?


  2. malcolmcoles
    Posted 7 years ago #

    Did you ever solve this? It sounds like the same problem I have here (with div inside <p>s):

Topic Closed

This topic has been closed to new replies.

About this Topic