%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/pn/beta/64801_wp-content/themes/intosai/templates/sections/
Upload File :
Create Path :
Current File : /var/www/pn/beta/64801_wp-content/themes/intosai/templates/sections/newsletter.php

<section class="content_section newsletter">
    <div class="wrapper">

        <div class="text">
            <?php if(!is_front_page() && is_home()){ ?>
                <h2>Sign up to our newsletter</h2>
                <h3>Subscribe now and be the first to receive all the latest updates!</h3>
            <?php }else{ ?>
                <h2><?php the_sub_field('title'); ?></h2>
                <h3><?php the_sub_field('subtitle'); ?></h3>
            <?php } ?>
        </div>
        <div class="signup">

            <form id="newsletter_signup" class="form" name="newsletter_signup" method="post" action="?subscribe" novalidate="novalidate">

                 <input type="email" class="inputbox" name="epost" placeholder="Enter your email" />

                 <button type="submit" class="btn trans-bg white white-border white-hover">
                     Subscribe
                </button>

             </form>

        </div>

        <?php
            if(isset($_GET['subscribe'])){
    			$user_data = array(
    				'email' 		=> $_POST['epost'],
    			);
    			$list = array(
    				2
    			);
    			$options = array(
                    'send_confirmation_email' => false,
                    'schedule_welcome_email' => false
    			);

                try {
                  $subscriber = \MailPoet\API\API::MP('v1')->addSubscriber($user_data, $list, $options);
                } catch(Exception $exception) {
                  // return $exception->getMessage();
                }
    		}
        ?>

    </div>
</section>

Zerion Mini Shell 1.0