WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Misamee
    Member
    Posted 5 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?

    Thanks,
    Andrea

  2. malcolmcoles
    Member
    Posted 5 years ago #

    Did you ever solve this? It sounds like the same problem I have here (with div inside <p>s):
    http://wordpress.org/support/topic/291591?replies=8

Topic Closed

This topic has been closed to new replies.

About this Topic