Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #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!

    #145322

    P.S. WordPress 4.0, X-Theme 3.0

    #145324
    This reply has been marked as private.
    #145469

    There 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.

    #145637

    Christopher
    Moderator

    Hi 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.

    #146239

    Although 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?

    #146528

    Christopher
    Moderator

    Hi 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.

    #146597
    This reply has been marked as private.
    #146812

    Christopher
    Moderator

    Hi there,

    I tried some CSS but it didn’t work ,Have you embed them through VC with iframe tag?

    #146944
    This reply has been marked as private.
    #146985

    The YouTube videos are placed directly in the posts, for example:

    http://youtu.be/ehH8KMIxntQ

    The iframe is then generated automatically by the shortcode handler.

    #147211

    Christian
    Moderator

    Hey there,

    In this case, please give us access to your WordPress admin so we could see the setup in the back-end.

    Thanks.

    #147259
    This reply has been marked as private.
    #147571

    Christopher
    Moderator

    Hi there,

    Please try to use embed code instead of share code,for example you have http://youtu.be/kRQH-lXWzrAin ‘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.

    #147744

    Ah, 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?