Mailchimp Plugin

Hi

I cannot figure out how to generate shortcode for this?

the previous email subscription was

<div class="newsletter">
<div class="container ">
<div class="col-xs-2 col-md-2 col-sm-2 col-lg-1" ><img src="<?php echo get_template_directory_uri(); ?>/images/nl.jpg" alt=""/></div>

<?php eemail_show(); ?>
</div>
</div>

Note: you need to point eagleascend.com to 103.242.94.113 if you want to see existing one

Ideas?

Thanks

  • Rupok

    Hi Martin, hope you had a wonderful day.

    Can you copy and paste the following code in your "functions.php" file inside your currently active theme directory??

    function custom_eemail_shortcode() {
    return '<div class="newsletter"><div class="container "><div class="col-xs-2 col-md-2 col-sm-2 col-lg-1" ><img src="'. get_template_directory_uri().'/images/nl.jpg" alt=""/></div>';
    eemail_show();
    return '</div></div>';
    }
    add_shortcode( 'eemail', 'custom_eemail_shortcode' );

    I've not tested this but it should work. You can use [eemail] shortcode.

    Or you can create a MU Plugin for this. For creating a MU Plugin, create a folder named "mu-plugins" inside your "wp-content" folder. Then inside that "mu-plugins" folder, create a file with any name and with a .php extension. Now paste the code inside that file and save.

    <?php
    function custom_eemail_shortcode() {
    return '<div class="newsletter"><div class="container "><div class="col-xs-2 col-md-2 col-sm-2 col-lg-1" ><img src="'. get_template_directory_uri().'/images/nl.jpg" alt=""/></div>';
    eemail_show();
    return '</div></div>';
    }
    add_shortcode( 'eemail', 'custom_eemail_shortcode' );

    For getting more idea on mu plugins, you can go through this article: http://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    Please let us know if you have any confusion or if you are stuck at any point. We will be glad to help.

    Have a nice day. Cheers!
    Rupok