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

  1. kendawes
    Posted 4 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?



  2. Don Fischer
    Plugin Author

    Posted 4 years ago #

    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,

  3. ZainB
    Posted 4 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.



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