hcochran212
asked 10 years ago

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! 

4 Answers
DominicStaff
answered 10 years ago

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 !

Helena Liu
replied 10 years ago

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?

DominicStaff
answered 10 years ago

Hi Helena ! Please send me username & password of your site (via private answer) for further checking.

DominicStaff
answered 10 years ago

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 !

Helena Liu
replied 10 years ago

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?

Dominic Staff
replied 10 years ago

Hi Helena !
Please send me username & password of your site (via private answer) for further checking.

DominicStaff
answered 10 years ago

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.

Powered by DW Question & Answer Pro