Hi. I’m trying to put a video on the homepage. I can’t upload directly from Youtube, so it asks me to enter a URL. When I put in the URL, the video itself does not show up on the homepage, just the link.
Help, please!
Hello Hcochran !
To display a video on the homepage of Wallpress theme. Please do as the following:
Step1: You can copy the Embed code on the Youtube.
See the screenshot:
Step2: log in to Dashboard > Posts > Add new, paste the Embed code into the “Text” frame.
See the screenshot:
Step3: In the Format pane on the right hand side, select the Video. See the screenshot:
Hope this helps !
Hi Dominic, I followed your instructions but the video doesn’t show up on the homepage. Only the post title shows up, and the video can only be seen when I click through to the post page. How do I make the video embed show up on the homepage?
Hi Helena ! Please send me username & password of your site (via private answer) for further checking.
Hi Helena !
To show the Video on the Homepage in the DW Wallpress, You can do as the following.
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 !
Sorry to be a pain Dominic, but I'm afraid I followed your instructions and it's still not showing up! The offending post is Reverse Racism on http://blog.helenaliu.com/. What am I missing?
Hi Helena !
Please send me username & password of your site (via private answer) for further checking.
Hi Helena !
Right now, You can check your site. We have helped you resolve the issue. You does not yet change in the functions.php file.
Please login or Register to submit your answer