Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Tracy Levesque

    (@liljimmi)

    ?????? YIKES, Inc. Co-Owner

    Hello hirschid,

    I took a look at your form and I don’t know why there are extra <p> and
    tags being inserted into the form code. If I look at one of our forms in a test site there are no extra tags like that appearing in the code.

    May I see the shortcode you are using?

    Can you think of any plugins you have installed that would be adding those tags?

    Thank you!
    -Tracy

    Plugin Author Evan Herman

    (@eherman24)

    Hi hirschid,

    There are extra <p> tags and tags because the description is being run through the_content filter which wraps everything in wpautop.

    Code: https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/blob/7d97a9b569c438e361bd3bab8ae216547b41dd69/plugin_core/public/class-yikes-inc-easy-mailchimp-extender-public.php#L70-L82

    If you want to remove the extra tags, feel free to try the following snippet.

    remove_filter( 'yikes-mailchimp-frontend-content', 'wpautop' );

    Ideally that will prevent the description from being run through the mentioned filter, thus preventing any extra html tags.

    Evan

    Thread Starter hirschid

    (@hirschid)

    Thanks! I added the snippet Evan suggested to my child theme functions.php and no joy.

    The shortcode I am using is this:

    [yikes-mailchimp form=”1″ submit=”Meditate Me!”]

    @tracy: I did look at forms on your website and, yes, no extra tags.

    This website is using the Karma theme with Visual Composer. Thinking Visual Composer may have been the issue, I added the shortcode to the test page linked above without using Visual Composer.

    Seems odd no one else has reported this issue. I also don’t understand, looking the the code on github, why I would need to add extra filters to my functions.php when it appears that wpautop is already off for shortcode:

    add_filter( 'yikes-mailchimp-frontend-content', 'shortcode_unautop' );

    I am using the current version of your plugin.

    Plugin Author Evan Herman

    (@eherman24)

    To follow up, shortcode_unautop ensures that the shortcode itself is not wrapped in autop, not the contents of the shortcode.

    I will continue to look into the issue, but I would first recommend you take a look at visual composer. That generally causes some funky issues with plugins.

    Thanks,
    Evan

    Plugin Contributor Tracy Levesque

    (@liljimmi)

    ?????? YIKES, Inc. Co-Owner

    Hi hirschid,

    We have not heard back from you in awhile so I am going to close out this ticket. If you need further help, feel free to reopen it.

    Thank you!
    -Tracy

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Edit output to remove extra p and br tags’ is closed to new replies.