WordPress.org

Ready to get started?Download WordPress

Forums

YouList - YouTube playlist shortcode
[resolved] [Plugin: youList - Youtube playlist shortcode] How can I embed this in a Sidebar Widget? (7 posts)

  1. neliocastro
    Member
    Posted 1 year ago #

    How can i embed this in a Text/HTML sidebar Widget?
    I have tried:

    [youlist pid="PL1A1DBF99FF0D6841" width="256" height="400"]

    No success. The widget displays the shortcode.

    Thanks,
    Nélio

    http://wordpress.org/extend/plugins/youlist/

  2. birgire
    Member
    Plugin Author

    Posted 1 year ago #

    hi Nélio

    You can do it by adding this at the bottom of your functions.php

    add_filter('widget_text', 'do_shortcode');

    It will then run (any) shortcodes in your widgets.

    Hope this helps

    ps: I didn't wan't to include this code in the youlist plugin - I might include it in the future as an option.

  3. birgire
    Member
    Plugin Author

    Posted 1 year ago #

    I think I found a way to run do_shortcode only for [youlist] in the text-widgets.

    If I get it to work I will upgrade the plugin so you can get this working in the sidebar text widgets

  4. gavinwebb
    Member
    Posted 1 year ago #

    I used the do_shortcode function in functions.php and it works fine.

  5. birgire
    Member
    Plugin Author

    Posted 1 year ago #

    I will add this to the plugin in the next version (today)

    if ( !has_filter( 'widget_text', 'do_shortcode' ) ){
            add_filter('widget_text', 'do_shortcode');
    }

    so [youlist] shortcodes can be used in text-widgets

  6. birgire
    Member
    Plugin Author

    Posted 1 year ago #

    You can now upgrade to 1.0.2

  7. neliocastro
    Member
    Posted 1 year ago #

    Updated! Work Great! Great Job!

    Thanks,

    Nélio

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic