WordPress.org

Ready to get started?Download WordPress

Forums

WP YouTube Lyte
[resolved] Can't use inside widgets (10 posts)

  1. Erlend Sogge Heggen
    Member
    Posted 1 year ago #

    I'd love to use this plugin to make my youtube embeds faster. The only thing stopping me is the fact that I can't use it inside widgets like you can with Responsive Video Light for instance.

    http://wordpress.org/extend/plugins/wp-youtube-lyte/

  2. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Erlend;
    Are you talking about text-widgets? I'll look into that, guess there's a filter I could hook into for that.

    There is, on the other hand, also a WP YouTube Lyte specific widget, to what extend does that (not?) suit your purposes?

    frank

  3. Erlend Sogge Heggen
    Member
    Posted 1 year ago #

    Sorry that was a bit imprecise. Yes I'm talking about the text/html widgets. I tried the Lyte widget and the problem is it's not suited for full-width display, i.e. a widget as a page display. I realize that's non-standard, but that's actually how a lot of WooThemes work today, as they use Widgets as a sort of simple block-builder for front page displays.

    Using the stock Text widget I've been able to set up a nice, responsive grid of videos. Only problem is the're much too heavy to load.

  4. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    OK, i'll look into that :)

  5. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    Morning Erlend;
    If you open up wp-content/plugins/wp-youtube-lyte/wp-youtube-lyte.php and at the very end replace

    /** hooking it all up to wordpress */
    if ( is_admin() ) {
            require_once(dirname(__FILE__).'/options.php');
    } else {
            add_filter('the_content', 'lyte_parse', 4);
            add_shortcode("lyte", "shortcode_lyte");
            remove_filter('get_the_excerpt', 'wp_trim_excerpt');
            add_filter('get_the_excerpt', 'lyte_trim_excerpt');
    }

    with

    /** hooking it all up to wordpress */
    if ( is_admin() ) {
            require_once(dirname(__FILE__).'/options.php');
    } else {
            add_filter('the_content', 'lyte_parse', 4);
            add_shortcode("lyte", "shortcode_lyte");
            remove_filter('get_the_excerpt', 'wp_trim_excerpt');
            add_filter('get_the_excerpt', 'lyte_trim_excerpt');
            add_filter('widget_text', 'lyte_parse', 4);
    }

    text widgets will be parsed by wp youtube lyte as well. Do take into account that YouTube requires a minimum player size of 200X200, so if the widget auto-scales to a value below that, the video will probably not play (but that's the same when using normal YouTube embeds).

  6. Erlend Sogge Heggen
    Member
    Posted 1 year ago #

    Thanks a bunch man. Hopefully I'll have my staging site up again some time today and I'll have a go at this.

  7. Erlend Sogge Heggen
    Member
    Posted 1 year ago #

    That appears to have done the trick alright. Outstanding! I aim to have a website that'll make great use of this plugin live within two weeks. If all goes well you'll hear from me ;)

  8. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Erlend;
    I'm working on a new version of this plugin which will come with an API, allowing to do the above without having to alter the plugin code itself. You can download the development version from http://downloads.wordpress.org/plugin/wp-youtube-lyte.zip

    Looking forward to your feedback! :-)

    frank

  9. LauraC1968
    Member
    Posted 3 months ago #

    I'm having problems using the widget - sergekakudji.com where it says "barbaro traditor" on the right sidebar, it should have a video below it. Is the sidebar too skinny? it USED to work! I've deleted and restalled the plugin, deleted and redone the widget, but it still won't work. Help!
    Laura

  10. futtta
    Member
    Plugin Author

    Posted 3 months ago #

    Laura, do you have any other page which features a normal lyte video (not a widget)? does that work?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.