-
AuthorPosts
-
November 14, 2014 at 2:11 pm #145321
I’m using the great function that lets you place a YouTube link in the body of a post, and automatically converts it into a video player when the post is viewed. Here is an example:
In Integrity->Masonry layout, it appears that YouTube videos are set to the height and width that is correct for them when displayed on the single post page, rather correct for Masonry layout. The result is that they look mis-formatted in Masonry layout.
An example is on my home page today (the home page may be updated tomorrow moving this link off the home page) at StoriesTheyForgot.com.
It’s password-protected for the moment, so I’ll enter the password in a separate post.
Is there a way to correct this? Thanks very much in advance for your thoughts and feedback!
November 14, 2014 at 2:12 pm #145322P.S. WordPress 4.0, X-Theme 3.0
November 14, 2014 at 2:13 pm #145324This reply has been marked as private.November 14, 2014 at 7:57 pm #145469There will be a YouTube video in the Masonry section all weekend and probably on Monday as well. I look forward to your thoughts and feedback.
November 15, 2014 at 6:55 am #145637Hi there,
You can change the height in <iframe> tag like this code to reduce the height of player:
<iframe class="top-center-image" width="640" height="290" src="http://www.youtube.com/embed/ehH8KMIxntQ?wmode=transparent" ?feature="player_embedded" frameborder="0" allowfullscreen="" wmode="Opaque"></iframe>
Hope it helps.
November 16, 2014 at 1:45 pm #146239Although I am running a child theme, my child theme is not generating that iframe. The iframe containing the youtube video for masonry layout posts is generated in post-template.php->function the_content, in the call to apply_filters:
function the_content( $more_link_text = null, $strip_teaser = false) { $content = get_the_content( $more_link_text, $strip_teaser ); /** * Filter the post content. * * @since 0.71 * * @param string $content Content of the current post. */ $content = apply_filters( 'the_content', $content ); $content = str_replace( ']]>', ']]>', $content ); echo $content; }
For this reason it appears that this is not part of my code and therefore is not something that I can change via my child theme.
Can you confirm?
November 17, 2014 at 2:55 am #146528Hi there,
Sorry for misunderstanding ,I think we need to see it live but the password is not working.
Would you provide us with correct password.Thank you.
November 17, 2014 at 4:57 am #146597This reply has been marked as private.November 17, 2014 at 9:25 am #146812Hi there,
I tried some CSS but it didn’t work ,Have you embed them through VC with iframe tag?
November 17, 2014 at 11:54 am #146944This reply has been marked as private.November 17, 2014 at 1:02 pm #146985The YouTube videos are placed directly in the posts, for example:
http://youtu.be/ehH8KMIxntQ
The iframe is then generated automatically by the shortcode handler.
November 17, 2014 at 9:13 pm #147211Hey there,
In this case, please give us access to your WordPress admin so we could see the setup in the back-end.
Thanks.
November 17, 2014 at 11:47 pm #147259This reply has been marked as private.November 18, 2014 at 8:09 am #147571Hi there,
Please try to use embed code instead of share code,for example you have
http://youtu.be/kRQH-lXWzrA
in ‘Executive Branch’and it’s a share code but<iframe width="560" height="315" src="//www.youtube.com/embed/kRQH-lXWzrA" frameborder="0" allowfullscreen></iframe>
is an embed cod which gives you control over width and height of <iframe> tag and you can easily change them.
Please check http://prntscr.com/57m8i9 i changed height of embedded iframe to 300 and it looks fine.
Hope it helps.November 18, 2014 at 11:30 am #147744Ah, but then the iframe will be far too small on the single post page.
I just deactivated my child theme entirely and tried out the page with the X-Theme main theme. The anomaly is still present.
It appears we may have identified a glitch in X-Theme that can be easily corrected in a future point upgrade.
If you agree, could you forward this to the development team as a minor bug report?
-
AuthorPosts