사이트 내 전체검색
wordpress
검색목록
wallpress 테마에서 목록에 동영상 플레이 넣기 How to show video on Wall?
로빈아빠
https://cmd.kr/wp/49 URL이 복사되었습니다.

본문

 

How to show video on Wall?

 

http://www.designwall.com/wordpress/themes/wallpress/ 

 

 

 

How to show video on Wall?

Hello, I want to show a video on the mainpage of the Wall-theme (like in the demo). But when I insert the iframe-YT-code and choose format “video”, nothing happens.

http://picload.org/image/cgolgrc/unbenannt.png

2 Answers

 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 !

Profile photo of Lukas Block Lukas Block commented 7 months ago

Hi Dominic, thanks! It worked! Will this be fixed in a new version (maybe for Wordpress 4)?

Profile photo of Dominic Dominic commented 7 months ago

We will fix this issue in the next version.

Dominic,
Greetings. When I noticed my iframe link video would not appear on the main page I made a post about the videos (clip syndicate news videos) and then set up a separate page where I put the iframe html. Within the commentary of the post I inserted a click here link to the page where the videos were. This worked i.e. clicked on post link and went to page in new window where you could click whatever item you wanted. I tried out the above and it worked for me too except that my post now also included 3 of the 6 videos that were on the separate video page. I’ve taken out the new coding. FYI the post categories Ive set are “main menu” and “news” while the page option “Get post from category” is set to featured.
Cheers
Brian

Add Your Answer

 

댓글목록

등록된 댓글이 없습니다.

wordpress
1 (1/1P)

Search

Copyright © Cmd 명령어 18.118.226.167