WordPress.org

Ready to get started?Download WordPress

Forums

Amazon Product in a Post Plugin
[resolved] [Plugin: Amazon Product In a Post Plugin] Shortcode in a Sidebar (3 posts)

  1. kendawes
    Member
    Posted 2 years ago #

    Is there a way to make the shortcode work in a sidebar text widget?
    If not a shortcode maybe via a php statement?

    Thanks!

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

  2. prophecy2040
    Member
    Plugin Author

    Posted 2 years ago #

    Ken,
    I responded to you personally already, but this is for anyone else looking for the same answer:

    Try adding this to your functions.php file for your theme (that way it will not be overwritten when the plugin is updated)

    if(function_exists('aws_prodinpost_filter_content')){add_filter('widget_text', 'aws_prodinpost_filter_content', 10);}

    This checks to make sure the plugin is installed and if so, adds the filter to the widget text.

    Keep in mind you may need to style the products to work in your sidebar theme, but that should solve your issue.
    Warm regards,
    Don

  3. ZainB
    Member
    Posted 2 years ago #

    Hi Ken,

    If you want to add any shortcodes to text widgets then just open your theme's functions.php file and add the following:

    add_filter('widget_text', 'do_shortcode');

    That will enable you to display any shortcode in the text widgets.

    Hope that's helpful.

    Cheers,

    Zain

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic