Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Andy,

    The content of your post is wrapped in a <div> element with the .entry-content class, which has the width limit set on it. Your form is not inside this div, so it is much wider.

    Solutions
    1. Wrap the shortcode in <div class="entry-content">[mc4wp_form]</div>.
    2. Wrap your form mark-up in <div class="entry-content"> and </div>.
    3. Use the following method to add the form to your post content. This will only add the form to blog posts. (recommended)

    <?php
    // your functions.php contents
    
    function mytheme_add_signup_form_to_posts( $content ) {
        if ( is_single() ) {
            // Add the form to the end of the post content.
            $content .= mc4wp_get_form();
        }
        return $content;
    }
    
    add_filter( 'the_content', 'mytheme_add_signup_form_to_posts' );

    This method is further explained here: Add MailChimp Sign-Up Form to the end of your posts.

    Let me know how that worked for you!

    Thread Starter andyptravel

    (@andyptravel)

    Hi Danny,

    Thanks for your response.

    I tried option 3 yesterday by editing the functions.php but it broke my whole theme and I’m on the phone with support now getting it back. A bit worried to try that again…

    But just used the div tag and it worked.

    Cheers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Signup form after post is too wide’ is closed to new replies.