Larger Widget Size
-
Hi Frank,
I absolutely love your YouTube plugin. It is the best on WP, and is free… π Thanks for this great plugin.
On my blog http://how-to-brew.coffee/ I use a page builder to create my posts and pages, hence I use widgets. The widgets are snippets of text and media. A paragraph is contained into a widget. This is why I found your widget exactly what I needed. The widget title, and the description are particularly of a great interest, as it’s easy to be grouped with the video.
The only change that I would need is the width of the widget. At this moment, the maximum is 400/300 which is half of the posts width. This means people will have to click on either click on the full page display, or click on see it on YouTube. None of these are good for the stats, as I would like to keep the visitor on my page until the end of the article. Would it be possible to get some more display sizes on the widget? Particularly larger sizes?
ThanksDorian
-
Evening Dorian;
The Lyte widgets, as opposed to the normal in-content Lyte’s, are not responsive. But what you could try is open up wp-content/plugins/wp-youtube-lyte/player_sizes.inc.php and at the bottom add an entry to the wSize array with the size of your liking;$wSize[8]['h']=600; $wSize[8]['w']=800; $wSize[8]['depr']=false;This will be picked up on by the widget-code and the new size should be available in the dropdown box.
hope this helps,
frankThanks so much for the speedy answer. I’ll try that, and see how it looks on mobiles.
Hi Frank,
I edited the player_sizes.inc.php and I got the new sizes in the widget settings.
However, none of the new sizes displays. I cleared the YT Lyte cache, and the hypercache. The video is displayed at 300/400. I think it doesn’t pick up ay other value now.Here is what I added to the code:
$wSize[8][‘h’]=525;
$wSize[8][‘w’]=700;
$wSize[8][‘depr’]=false;
$wSize[9][‘h’]=600;
$wSize[9][‘w’]=800;
$wSize[9][‘depr’]=false;Thanks again,
did a quick test on my own test-site, and the width & height the lyte widget gets is actually correct. the problem is that the width of the widget-area, in which the lyte widget is contained, is smaller then the lyte-widget, so i’m maxing out on that. this is probably what is happening in your case as well.
frank
Hi Frank,
Thanks again for helping out with this. Yes, that is the case. And since the lyte widget is styled inline, I can’t override that.
I could probably use !important, but I’m not keen on this approach.This custom css fixed the issue.
Thanks again..lyte-wrapper.lidget {
width: 640px !important;
height: 480px !important;
}indeed. alternatively you could use this (you could even put it in a text-widget or in a lyte widget’s text);
<style>.lidget{max-width:1000% !important;}</style>frank
The topic ‘Larger Widget Size’ is closed to new replies.