WordPress.org

Forums

Amazon Product in a Post Plugin
[resolved] How to call inside the theme (3 posts)

  1. cloudduster
    Member
    Posted 2 years ago #

    Hi. Is there a way to call the plugin from inside the theme?
    Thanks.

    http://wordpress.org/extend/plugins/amazon-product-in-a-post-plugin/

  2. Don Fischer
    Member
    Plugin Author

    Posted 2 years ago #

    if you want to put a product in a template page, you can use the do_shortcode method like so:

    <?php echo do_shortcode('[AMAZONPRODUCTS ASIN=1234567890]');?>

    or if you used a custom field for the ASIN, you could do something like this:

    <?php
    $amazon_prod = get_post_meta{$post->ID,'amazon-asin',true);
    if($amazon_prod!=''){
        echo do_shortcode("[AMAZONPRODUCTS ASIN={$amazon_prod}]");
    }
    ?>

    Hope that helps.
    Regards,
    Don

  3. cloudduster
    Member
    Posted 2 years ago #

    Thank you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Amazon Product in a Post Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.