WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. cloudduster
    Member
    Posted 1 year 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. prophecy2040
    Member
    Plugin Author

    Posted 1 year 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 1 year ago #

    Thank you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.