• Resolved Kevinlikes

    (@kevinlikes)


    Hi Futta
    Thanks again for a great plugin. I’ve started using Autoptimize too, which has also been wonderful.

    I’m currently working on a development site where we’ve been using a lot of custom fields with YouTube Lyte. It’s all worked well, with the exception of playlists. For example on https://bit.ly/1r8IebE, I’m trying to embed https://www.youtube.com/watch?v=qGp5kDFMLbE&list=PL3573FB8C217FCF4C as the featured video. But if I paste qGp5kDFMLbE&list=PL3573FB8C217FCF4C, it just embeds the first video, not the full playlist. And if I try use playlist?list=PL3573FB8C217FCF4C, it doesn’t embed at all, and if I use PL3573FB8C217FCF4C, it embeds a blank video and tells me the video doesn’t exist when clicked.

    Would love any pointers on what I’m doing wrong. Thanks so much.

    https://www.ads-software.com/plugins/wp-youtube-lyte/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Frank Goossens

    (@futtta)

    hi kevinlikes;
    are you using lyte_preparse()?

    frank

    Thread Starter Kevinlikes

    (@kevinlikes)

    Hi Frank.
    Yes, we are. I’ll need to get my developer to talk it through with you if you need more detail than that though…

    Kevin

    Plugin Author Frank Goossens

    (@futtta)

    There is no logic in lyte_preparse that allows to differentiate between video’s and playlists. Your developer could instead create “lyte_preparse_playlist”, probably something like;

    function lyte_preparse_playlist($PLid) {
        return lyte_parse('httpv://www.youtube.com/playlist?list='.$PLid);
    }

    and for custom fields that contain a playlist, call that function instead of lyte_preparse().

    Hi Frank,

    Yes, lyte_preparse(). We are pulling it from a custom field with the following code:

    add_action( 'genesis_before_entry_content', 'lyte_video_custom_field' );
    function lyte_video_custom_field() {
    	$video = get_post_meta(get_the_id(), lyteID, true);
    	if(function_exists('lyte_preparse') && $video) {
    		echo lyte_preparse($video);
    	}
    }

    I don’t mind creating another custom field for playlists if that’ll help.
    How does one parse playlists?

    Thanks,
    Simon

    You’re too fast, Frank : ) Thanks so much

    Thread Starter Kevinlikes

    (@kevinlikes)

    Thanks Frank. Your response time is amazing, as always.

    Plugin Author Frank Goossens

    (@futtta)

    Happy you guys are happy, have a great weekend!

    frank

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Problems with playlists in custom fields’ is closed to new replies.