Title: shorcode function in template
Last modified: January 20, 2019

---

# shorcode function in template

 *  Resolved [ivandelajara](https://wordpress.org/support/users/ivandelajara/)
 * (@ivandelajara)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/shorcode-function-in-template/)
 * 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](https://wordpress.org/support/users/ivandelajara/).

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

 *  Thread Starter [ivandelajara](https://wordpress.org/support/users/ivandelajara/)
 * (@ivandelajara)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/shorcode-function-in-template/#post-11110388)
 * 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](https://wordpress.org/support/users/ivandelajara/).
 *  Plugin Author [paulstuttard](https://wordpress.org/support/users/paulstuttard/)
 * (@paulstuttard)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/shorcode-function-in-template/#post-11110539)
 * 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](https://wordpress.org/support/users/paulstuttard/).
    -  This reply was modified 7 years, 4 months ago by [paulstuttard](https://wordpress.org/support/users/paulstuttard/).
 *  Thread Starter [ivandelajara](https://wordpress.org/support/users/ivandelajara/)
 * (@ivandelajara)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/shorcode-function-in-template/#post-11110549)
 * Solved!
 * I was trying to use arrays hehe
 *  Plugin Author [paulstuttard](https://wordpress.org/support/users/paulstuttard/)
 * (@paulstuttard)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/shorcode-function-in-template/#post-11110560)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/amazon-link_070606.svg)
 * [Amazon Link](https://wordpress.org/plugins/amazon-link/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amazon-link/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amazon-link/)
 * [Active Topics](https://wordpress.org/support/plugin/amazon-link/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amazon-link/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amazon-link/reviews/)

## Tags

 * [Short Code](https://wordpress.org/support/topic-tag/short-code/)

 * 4 replies
 * 2 participants
 * Last reply from: [paulstuttard](https://wordpress.org/support/users/paulstuttard/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/shorcode-function-in-template/#post-11110560)
 * Status: resolved