Greetings,
I have just installed your WallPress (found at designscrazed.com). Thanks, It looks nice. 🙂
On the main page, however, the thumbs for videos are unproportionally streched.
How may I make sure, that they look “nice”, as well?
The site is a.feny.be
My WP is 3.6 for the time being.
Thanks and greetings,
Tamas
To display the Video thumbnail in the DW Wallpress, take a look at the following solution:
1. Log in to Dashboard > Appearance > Customize > Custom Code, add the following code to the “Header Code” section.
<style>
.masonry .format-video .item-content iframe, .masonry .format-video .item-content embed {
display: block;
}
</style>
– Add the following code to the “Footer code” section:
<script>
jQuery(function($){
function responsiveIframe() {
$('iframe').each(function(){
if ( ! $(this).hasClass('twitter-tweet') ) {
var iw = $(this).attr('width');
var ih = $(this).attr('height');
var ip = $(this).parent().width();
var ipw = ip/iw;
var ipwh = ih*ipw;
$(this).css({
'width': ip,
'height' : ipwh,
});
}
});
}
$(document).ready(function(){
responsiveIframe();
});
$(window).resize(function(){
setTimeout(function(){
responsiveIframe();
},500);
});
$('.masonry').masonry('reload',function(){
setTimeout(function(){
responsiveIframe();
},500);
});
});
</script>
2. Open the functions.php file. Find the line 660 & line 661. Replace the following code:
add_filter('the_excerpt', 'wallpress_strip_tags');
add_filter('the_content', 'wallpress_strip_tags');
With new code:
//add_filter('the_excerpt', 'wallpress_strip_tags');
//add_filter('the_content', 'wallpress_strip_tags');
Hope this helps !
Thanks, Dominic!
I have made these steps (without understanding them) and the result:
– the page loads in VERY slowly
– there good (the mobile friendly ones?) and there are still streched thumbs.
What is the next step?
Will this soultions be integarted into the new version?
Thanks a lot,
Tamas
Hi Tamas,
Thanks for the additional info !
I checked your site and below is our suggestion:
The best solution to resolve the issue is to use iframe for embedded video instead of object.
Try it and let us know the result,
my friend 😉
Please login or Register to submit your answer