• Resolved ivandelajara

    (@ivandelajara)


    I found that this plugin doesnt use the add_shortcode function so i cannot call it in a template part… I saw the code and the plugin is actually analising “manually” the content and widgets instead using the standard functions…

    I tried to use the function amazon_shortcode directly without luck…

    can you update the code for that?

    I need to use the shortcode inside the template…

    Im trying to show the price in the listings.

    • This topic was modified 7 years, 4 months ago by ivandelajara.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter ivandelajara

    (@ivandelajara)

    Adding the following line finish in the same wrong functioning

    add_shortcode(‘amazon’, ‘amazon_shortcode’);

    using it like this, the plugin templates doesnt works

    The shortcode is rendered but wrongly

    • This reply was modified 7 years, 4 months ago by ivandelajara.
    Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    The standard shortcode is not powerful enough for the plugin’s arguments. Try putting the following in your template:

    
    <?php
    if (function_exists('amazon_shortcode')) echo amazon_shortcode("asin=1234567890&template=image");
    ?>
    

    Replace the bit between the “s with the shortcode arguments.

    Paul

    • This reply was modified 7 years, 4 months ago by paulstuttard.
    • This reply was modified 7 years, 4 months ago by paulstuttard.
    Thread Starter ivandelajara

    (@ivandelajara)

    Solved!

    I was trying to use arrays hehe

    Plugin Author paulstuttard

    (@paulstuttard)

    Cool,

    Glad you got it working.

    Paul

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

The topic ‘shorcode function in template’ is closed to new replies.