Subscribe form with Pop up Pro and Mailchimp integration

I need the steps to create a pop up with subscribe form from mail chimp.

I have mailchimp integration and pop up pro installed.

  • Adam Czajczyk

    Hey Chris,

    I hope you're well today and thank you for your question!

    Our MailChimp Integration plugin do not include any form or shortcode that would allow you to do this since it's not designed for such a "straight through" integration. Instead, it gives you a widget.

    However, I think there may be a workaround. I've tested this on my own setup and it seems to be working fine. To apply this please follow the steps below:

    1. Add this code to your current theme's functions.php file:

    function widget($atts) {
    
        global $wp_widget_factory;
    
        extract(shortcode_atts(array(
            'widget_name' => FALSE
        ), $atts));
    
        $widget_name = wp_specialchars($widget_name);
    
        if (!is_a($wp_widget_factory->widgets[$widget_name], 'WP_Widget')):
            $wp_class = 'WP_Widget_'.ucwords(strtolower($class));
    
            if (!is_a($wp_widget_factory->widgets[$wp_class], 'WP_Widget')):
                return '<p>'.sprintf(__("%s: Widget class not found. Make sure this widget exists and the class name is correct"),'<strong>'.$class.'</strong>').'</p>';
            else:
                $class = $wp_class;
            endif;
        endif;
    
        ob_start();
        the_widget($widget_name, $instance, array('widget_id'=>'arbitrary-instance-'.$id,
            'before_widget' => '',
            'after_widget' => '',
            'before_title' => '',
            'after_title' => ''
        ));
        $output = ob_get_contents();
        ob_end_clean();
        return $output;
    
    }
    add_shortcode('widget','widget');

    This will let you to trigger most of your site's widgets via a shortcode.

    2. Add this shortcode to your popup content:

    [widget widget_name="Incsub_Mailchimp_Widget"]

    I hope that helps!

    Cheers,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.