Title: Shortcode not Supported
Last modified: August 30, 2016

---

# Shortcode not Supported

 *  Resolved [Pamela1991](https://wordpress.org/support/users/pamela1991/)
 * (@pamela1991)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/shortcode-not-supported/)
 * Hello,
 * Amazing plugin! I’ve been using it for some time now.
 * However, I am using a WordPress popup plugin that does not support shortcode ([
   ALO-EASYMAIL-PAGE]). I am trying to manually paste in the HTML code that the 
   shortcode displays, but it is not working.
 * What is the HTML code I can paste in lieu of the shortcode to display the same
   thing that would display when using [ALO-EASYMAIL-PAGE]?
 * Thanks!
 * [https://wordpress.org/plugins/alo-easymail/](https://wordpress.org/plugins/alo-easymail/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [eventualo](https://wordpress.org/support/users/eventualo/)
 * (@eventualo)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/shortcode-not-supported/#post-6897856)
 * Hi, you can’t simply paste the form html. The shortcode works only inside newsletter
   page, not everywhere.
    The best way to manually add the form is php: [http://www.eventualo.net/blog/easymail-newsletter-for-developers/#tutorial-formintemplate](http://www.eventualo.net/blog/easymail-newsletter-for-developers/#tutorial-formintemplate)
 *  Thread Starter [Pamela1991](https://wordpress.org/support/users/pamela1991/)
 * (@pamela1991)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/shortcode-not-supported/#post-6897857)
 * Thanks!
 * However, is there a way to manually add the form in JavaScript instead of PHP?
 * Thanks again.
 *  Plugin Author [eventualo](https://wordpress.org/support/users/eventualo/)
 * (@eventualo)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/shortcode-not-supported/#post-6897905)
 * You can try to copy the html generated by the plugin form or page and paste it
   inside your popup. If it does not work, you have to include also the javascript
   that manages the ajax submit (search for the javascript function `alo_em_pubblic_form`
   function inside the html of a page/post of your blog).
 *  Thread Starter [Pamela1991](https://wordpress.org/support/users/pamela1991/)
 * (@pamela1991)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/shortcode-not-supported/#post-6897913)
 * Thanks, that worked!
 * I had to first remove the newsletter from the widgets and then used the code 
   below.
 * For anyone else that may want to do this, here is the exact code you will need
   to use (**NOTE: You MUST change the 3 values below that I’ve placed between ‘\*\*\*\*\*’
   that are relevant to your own website**. You may find these values by viewing
   the source code of the page):
 *     ```
       <script type="text/javascript">
       		//<![CDATA[
       				function alo_em_pubblic_form ()
       		{
   
       			var alo_cf_array = new Array();
       									document.alo_easymail_widget_form.submit.value="sending...";
       			document.alo_easymail_widget_form.submit.disabled = true;
       			document.getElementById('alo_em_widget_loading').style.display = "inline";
       			document.getElementById('alo_easymail_widget_feedback').innerHTML = "";
   
       			var alo_em_sack = new sack("http://*****www.YOURWEBSITE.com*****/wp-admin/admin-ajax.php" );
   
       			alo_em_sack.execute = 1;
       			alo_em_sack.method = 'POST';
       			alo_em_sack.setVar( "action", "alo_em_pubblic_form_check" );
       						alo_em_sack.setVar( "alo_em_opt_name", document.alo_easymail_widget_form.alo_em_opt_name.value );
       						alo_em_sack.setVar( "alo_em_opt_email", document.alo_easymail_widget_form.alo_em_opt_email.value );
       						alo_em_sack.setVar( "alo_easymail_txt_generic_error", 'Error during operation.' );
       			alo_em_sack.setVar( "alo_em_error_email_incorrect", "The e-email address is not correct");
       			alo_em_sack.setVar( "alo_em_error_name_empty", "The name field is empty");
       						alo_em_sack.setVar( "alo_em_error_email_added", "Warning: this email address has already been subscribed, but not activated. We are now sending another activation email");
       			alo_em_sack.setVar( "alo_em_error_email_activated", "Warning: this email address has already been subscribed");
       			alo_em_sack.setVar( "alo_em_error_on_sending", "Error during sending: please try again");
       			alo_em_sack.setVar( "alo_em_txt_ok", "Your subscription was successfully activated. You will receive the next newsletter. Thank you.");
       			alo_em_sack.setVar( "alo_em_txt_subscribe", "Subscribe");
       			alo_em_sack.setVar( "alo_em_lang_code", "en");
   
       			var cbs = document.getElementById('alo_easymail_widget_form').getElementsByTagName('input');
       			var length = cbs.length;
       			var lists = "";
       			for (var i=0; i < length; i++) {
       				if (cbs[i].name == 'alo_em_form_lists' +'[]' && cbs[i].type == 'checkbox') {
       					if ( cbs[i].checked ) lists += cbs[i].value + ",";
       				}
       			}
       			alo_em_sack.setVar( "alo_em_form_lists", lists );
       			alo_em_sack.setVar( "alo_em_nonce", '*****zp689258w1*****' );
       			//alo_em_sack.onError = function() { alert('Ajax error' )};
       			alo_em_sack.runAJAX();
   
       			return true;
   
       		}
       				//]]>
       	</script>
       <p>Subscribe to my newsletter below!</p>
       <div id='alo_easymail_page'><div id='alo_em_widget_loading' class='alo_em_widget_loading' style='display:none;'><img src='http://*****www.YOURWEBSITE.com*****/wp-content/plugins/alo-easymail/images/wpspin_light.gif' alt='' style='vertical-align:middle' /> sending...</div>
       <div id='alo_easymail_widget_feedback'></div>
       <form name='alo_easymail_widget_form' id='alo_easymail_widget_form' class='alo_easymail_widget_form alo_easymail_widget_form_public' method='post' action='' onsubmit='alo_em_pubblic_form();return false;'>
       <table class='alo_easymail_form_table'><tbody>
         <tr>
           <td><label for='opt_name'>Name</label></td>    <td><input type='text' name='alo_em_opt_name' value='' id='opt_name' maxlength='50' class='input-text' /></td>
         </tr>
         <tr>
           <td><label for='opt_email'>E-mail</label></td>
           <td><input type='text' name='alo_em_opt_email' value='' id='opt_email' maxlength='50' class='input-text' /></td>
         </tr>
       </tbody></table>
       <input type='submit' name='submit' value='Subscribe' class='input-submit' />
       </form>
       </div>
       ```
   
 *  [quadbox](https://wordpress.org/support/users/quadbox/)
 * (@quadbox)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/shortcode-not-supported/#post-6897960)
 * What about the nonce?
    As i understand, nonce is temporary security token/session.
   So how could we address ‘alo_em_nonce’ value issue when using this inline HTML
   implementation?
 * furthermore,
    I’m getting different value from looking the source HTML using 
   Chrome and Firefox (FF doesn’t even work properly with the nonce value from Chrome,
   while Edge does)
 *  [quadbox](https://wordpress.org/support/users/quadbox/)
 * (@quadbox)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/shortcode-not-supported/#post-6897961)
 * now suddenly it do work, but still… can you please shed some light on the nonce
   part..
 *  Thread Starter [Pamela1991](https://wordpress.org/support/users/pamela1991/)
 * (@pamela1991)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/shortcode-not-supported/#post-6897962)
 * I thought _alo\_em\_nonce_ is constant for a particular installation? Maybe **
   eventualo** can shed some light on this?
 *  Plugin Author [eventualo](https://wordpress.org/support/users/eventualo/)
 * (@eventualo)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/shortcode-not-supported/#post-6897963)
 * The remark of quadbox is right. The nonces are security tokens with a limited“
   lifetime” after which they expire. From the codex: [https://codex.wordpress.org/WordPress_Nonces](https://codex.wordpress.org/WordPress_Nonces)
 * So, you have to replace the static nonce in your javascript with the php code
   that generates nonces, so the nonce line should be:
 * `alo_em_sack.setVar( "alo_em_nonce", '<?php echo wp_create_nonce('alo_em_form')?
   >' );`
 * If the code is not in a php file, you can use `wp_localize_script` or another
   head hook ([example](http://wordpress.stackexchange.com/questions/119573/is-it-possible-to-use-wp-localize-script-to-create-global-js-variables-without-a))
   to prepare the nonce variabile and then get it in your javascript.
    E.g. the 
   nonce generation in php:
 *     ```
       function my_easymail_nonce(){ ?>
             <script type="text/javascript">
               var easymailNonce = '<?php echo wp_create_nonce('alo_em_form'); ?>';
             </script><?php
       }
       add_action ( 'wp_head', 'my_easymail_nonce' );
       ```
   
 * and then us it in javascript:
    `alo_em_sack.setVar( "alo_em_nonce", easymailNonce);`

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Shortcode not Supported’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/alo-easymail_574f4b.svg)
 * [ALO EasyMail Newsletter](https://wordpress.org/plugins/alo-easymail/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/alo-easymail/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/alo-easymail/)
 * [Active Topics](https://wordpress.org/support/plugin/alo-easymail/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/alo-easymail/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/alo-easymail/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 8 replies
 * 3 participants
 * Last reply from: [eventualo](https://wordpress.org/support/users/eventualo/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/shortcode-not-supported/#post-6897963)
 * Status: resolved