Support » Plugins and Hacks » Etsy Shop » do_shortcode soesn't work

do_shortcode soesn't 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:


    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.


Viewing 4 replies - 1 through 4 (of 4 total)
  • 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?


    Plugin Author fsheedy


    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.

    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


    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.
Skip to toolbar