Title: do_shortcode soesn&#039;t work
Last modified: August 21, 2016

---

# do_shortcode soesn't work

 *  [kevleitch](https://wordpress.org/support/users/kevleitch/)
 * (@kevleitch)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/do_shortcode-soesnt-work/)
 * Hi,
 * I need to use do_shortcode to execute the code from a custom template via custom
   fields. Here’s what I’m doing:
 * `
    $shopSection = get_post_meta($post->ID, 'SS_id', true); $options = get_option('
   sample_theme_options'); $shopName = $options['sometext']; echo do_shortcode( '[
   etsy-include=' . $shopName . ';' . $shopSection . ']' );
 * This simply prints:
 * `
    [etsy-include=MandaCrafts;5557344]
 * to the page instead of being translated by WordPress.
 * If I paste the same shortcode into the main content editor then it works fine
   so I know the shortcode is fine. The plugin is not processing it correctly.
 * [http://wordpress.org/extend/plugins/etsy-shop/](http://wordpress.org/extend/plugins/etsy-shop/)

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

 *  Thread Starter [kevleitch](https://wordpress.org/support/users/kevleitch/)
 * (@kevleitch)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/do_shortcode-soesnt-work/#post-3929236)
 * Had a quick look through the plugin code – it seems you are wrapping the shortcode
   up into the_content() – is that right?
 * If its at all possible I’d really like a way to be able to pass in the shop name
   and section codes dynamically. Is that something that could easily be done do
   you think?
 * Thanks.
 *  Plugin Author [fsheedy](https://wordpress.org/support/users/fsheedy/)
 * (@fsheedy)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/do_shortcode-soesnt-work/#post-3929381)
 * If it’s a page or a post, shortcode will be read automatically by the plugin.
 * Why you want to code something more, it will help me find the best way to help
   you.
 *  Thread Starter [kevleitch](https://wordpress.org/support/users/kevleitch/)
 * (@kevleitch)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/do_shortcode-soesnt-work/#post-3929396)
 * My client is not very knowledgeable so I’d like her to be able to put the Shop
   name into a text box and enter the numerical value for each section in a custom
   field. This means she only has to enter her shop name once in one place and it
   also means she just needs to enter the shop section id number in a custom field
   rather than have to type out the shortcode into a Page every time.
 * It makes much more sense to me to be able to set the two required values dynamically
   via code than enter them manually each time.
 *  Plugin Author [fsheedy](https://wordpress.org/support/users/fsheedy/)
 * (@fsheedy)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/do_shortcode-soesnt-work/#post-3929413)
 * I agree with you, this feature (have a form to generate the shortcode) is planned
   for version 1.x

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

The topic ‘do_shortcode soesn't work’ is closed to new replies.

 * ![](https://ps.w.org/etsy-shop/assets/icon-256x256.png?rev=1089359)
 * [Etsy Shop](https://wordpress.org/plugins/etsy-shop/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/etsy-shop/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/etsy-shop/)
 * [Active Topics](https://wordpress.org/support/plugin/etsy-shop/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/etsy-shop/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/etsy-shop/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [fsheedy](https://wordpress.org/support/users/fsheedy/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/do_shortcode-soesnt-work/#post-3929413)
 * Status: not resolved