Support » Plugin: MailPoet - emails and newsletters in WordPress » remove from shortcode

  • tried all variations of the “disabling WPAUTOP” solution, but there seems to be no way to stop WP adding <br> and <p> to the output of shortcode [mailpoet_form id=”xxx”]

    the output always appear peppered with <br> like this:

    <form target="_self" method="post" action="https://www.domain.ext/wp-admin/admin-post.php?action=mailpoet_subscription_form" class="mailpoet_form mailpoet_form_shortcode" novalidate=""><br>
          <input name="data[form_id]" value="1" type="hidden"><br>
          <input name="token" value="ab4d289440" type="hidden"><br>
          <input name="api_version" value="v1" type="hidden"><br>
          <input name="endpoint" value="subscribers" type="hidden"><br>
          <input name="mailpoet_method" value="subscribe" type="hidden"><p></p>

    which pushes the form way out of alignment.

    has anyone found a solution to stop this from happening?

    thanks

    • This topic was modified 1 year, 3 months ago by maxgx.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author MailPoet

    (@wysija)

    Hi @maxgx,

    Would most probably be best to just style the form with CSS instead. If you’d like to link us to a page, we’d be happy to take a look.

    Thanks!

    i am not attempting to style any form, i’m using your shortcode as is.
    and it comes out full of <br> at any line break it (your shortcode) generates.
    i cannot tamper with the functions your plugin uses to generate such output, but imho you could/should.

    sorry @mailpoet, any chance for a solution yet?
    … are we sure we are talking about the same thing?

    i’ve pasted the output of YOUR shortcode, and it’s shown full of (unexpected) <br> tags.

    the theme is a child of twentythirteen with little to no mods, so i am definitely out of clues on how to stop this weird behaviour.

    this is the url of the page: https://www.associazionegapa.org

    could you kindly reply?

    thanks

    • This reply was modified 1 year, 1 month ago by maxgx.
    jarledb

    (@jarledb)

    Seeing this behaviour too. In the Pro version.

    Happens when this is active (which we need, to strip some WordPress added br/p’s when dealing with shortcode content)

    remove_filter( ‘the_content’, ‘wpautop’ );
    add_filter( ‘the_content’, ‘wpautop’ , 12);

    Would changing the priority of the add_filter help?

    maxgx

    (@maxgx)

    hi @jarledb,

    i tried the snippet but it makes no difference, all <br>s are still there.

    in the end i solved it by using css:

    body.home .mailpoet_form br {
        display: none;
    }
    jarledb

    (@jarledb)

    Maxg, my message was not a fix to the problem. It was something that created the problem on the site in question. Did not have the problem before we added that.

    Something similar is probably happening on your site as well.

    My fix will be to use a form plugin (in my case Gravity Forms) to handle signups with a connection to the Mailpoet plugin.

    I have several niggles with the Mailpoet form: The reCaptcha is ugly (using a narrow version that can’t be overridden), its not properly coded to be WAI accessible, and this problem…

    • This reply was modified 9 months ago by jarledb.
    maxgx

    (@maxgx)

    oh right, sorry i misunderstood.

    nothing of the sort on my site though, not tampering with “wpautop” in any way, so that’s not what’s causing the problem to me.

    i’m with you on the many problems Mailpoet is showing, but they don’t seem to actively care too much, which is a pity.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘remove from shortcode’ is closed to new replies.