Title: Add shortcode in email content
Last modified: July 22, 2018

---

# Add shortcode in email content

 *  Resolved [redmonkey73](https://wordpress.org/support/users/redmonkey73/)
 * (@redmonkey73)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/add-shortcode-in-email-content/)
 * Hi!
    We test this plugin for our project, it look great, but i have some problem
   with add my custom shortcode to email content I am Disable setting General->Content-
   >Strip all shortcodes and add my custom shortcode in content email template, 
   but then i got email i just see my shordcode name like [my_custom_shortcede] 
   Let me know, can i use custom shortcode in Content field ? Thank you!

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

 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/add-shortcode-in-email-content/#post-10517864)
 * Hi [@redmonkey73](https://wordpress.org/support/users/redmonkey73/), thanks!
 * You can use the shortcode but maybe it’s rendered after the notification is sent?
   How do you register your shortcode? On `init` action maybe?
 *  Thread Starter [redmonkey73](https://wordpress.org/support/users/redmonkey73/)
 * (@redmonkey73)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/add-shortcode-in-email-content/#post-10518082)
 * Hi [@kubitomakita](https://wordpress.org/support/users/kubitomakita/), thanks
   for answear!
    My shortcod register like that
 *     ```
       add_shortcode('sb_show_following','sb_show_following');
       function sb_show_following($atts) {
       echo 'test';
       }
       ```
   
 *  Thread Starter [redmonkey73](https://wordpress.org/support/users/redmonkey73/)
 * (@redmonkey73)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/add-shortcode-in-email-content/#post-10518281)
 * Am use this shortcode in custom plugin
 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/add-shortcode-in-email-content/#post-10518460)
 * Hmm, it should work fine this case. Let me test this and I’ll come back to you.
 *  Thread Starter [redmonkey73](https://wordpress.org/support/users/redmonkey73/)
 * (@redmonkey73)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/add-shortcode-in-email-content/#post-10518462)
 * I am also try make like this
    <?php
 *     ```
       function wporg_shortcodes_init()
       {
           function wporg_shortcode($atts = [], $content = null)
           {
               // do something to $content
   
               // always return
               return $content;
           }
           add_shortcode('wporg', 'wporg_shortcode');
       }
       add_action('init', 'wporg_shortcodes_init');
       ```
   
 * in plugin, and in functions.php, but is not help me
 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/add-shortcode-in-email-content/#post-10537218)
 * Hi, sorry for the late response. This was actually a bug in the plugin. Now, 
   when you have the `Strip all shortcodes` setting disabled, the shortcodes are
   rendered.
 * It will be released soon, but if you need this change right now, you can [download the development version](https://drive.google.com/file/d/154zBUd_1YMQBl4-dqXEI-Fc5jpaLTGfR/view?usp=sharing).
 * PS. There’s a bug in your first shortcode. You have to return the value, not 
   echo it.
    -  This reply was modified 7 years, 9 months ago by [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/).
 *  Thread Starter [redmonkey73](https://wordpress.org/support/users/redmonkey73/)
 * (@redmonkey73)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/add-shortcode-in-email-content/#post-10539065)
 * Hi, thank you so much, great news, i will test dev version today, also we wait
   new version in repo!

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

The topic ‘Add shortcode in email content’ is closed to new replies.

 * ![](https://ps.w.org/notification/assets/icon-256x256.gif?rev=3476901)
 * [Notification - Custom Notifications and Alerts for WordPress](https://wordpress.org/plugins/notification/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/notification/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/notification/)
 * [Active Topics](https://wordpress.org/support/plugin/notification/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/notification/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/notification/reviews/)

## Tags

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

 * 7 replies
 * 2 participants
 * Last reply from: [redmonkey73](https://wordpress.org/support/users/redmonkey73/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/add-shortcode-in-email-content/#post-10539065)
 * Status: resolved