WordPress.org

Support

Support » How-To and Troubleshooting » YouTube Text Wrap

YouTube Text Wrap

Viewing 9 replies - 1 through 9 (of 9 total)
  • Pioneer Web Design
    Participant

    @swansonphotos

    I am having a heck of a time text-wrapping a YouTube video to fit directly underneath an inserted image.

    When you grab the embed code, start small…test…

    mrlaporte
    Member

    @mrlaporte

    We have been doing that . . . using a <div> code, but we had had to place the embed code inside of the middle of the text for it to sit right, which does not always work. It actually only works about 50% of the time.

    Do you know of an easier way? A plug-in? Anything?

    Timothy Jacobs
    Participant

    @timothyblynjacobs

    Because of how your theme is setup I don’t think you will be able to do this. The youtube video is inside of a separate div element from your featured image. I would usually say to put them inside the same div, but this obviously isn’t easily done. Best would be to create a custom meta box on the wp post screen with a space for a link to a youtube video and integrate into your themes template.

    The only easy, albeit awful, solution is to hardcode in margins. For the post you linked to:

    margin-top: 60px;
    margin-left: -310px;
    mrlaporte
    Member

    @mrlaporte

    Timothy-

    Is there a way I can integrate the YouTube video into the featured image div? I am just dropping the embed code into the actual post right now. I’m not doing anything fancy.

    Timothy Jacobs
    Participant

    @timothyblynjacobs

    Yes, but you would need to know what you are doing, now is the time to learn.

    Is there any easy way without modding your theme, short answer, no.

    mrlaporte
    Member

    @mrlaporte

    Thanks Tim –

    I should preface that I am speaking on behalf of the student who is the webmaster for our student journalism site. I do appreciate your feedback and I hope this is something he can take on. I know that looking at that only made my head hurt.

    Pioneer Web Design
    Participant

    @swansonphotos

    I do appreciate your feedback and I hope this is something he can take on. I know that looking at that only made my head hurt.

    And why is that?

    mrlaporte
    Member

    @mrlaporte

    My experience in this area is limited, at best.

    Mickey1979
    Member

    @mickey1979

    easy solution:

    in your child css file:
    #video-wrap {
    float: right;
    margin: 0 0 0 10px;
    }
    (just change the float and margin)

    in the page – text tab:
    <div id=”video-wrap”>
    (and than in iframe code just change the size of the video and add the src.)
    <iframe style=”float: right;” src=”http://www.youtube.com/embed/d8KK3xnEV34?feature=oembed” height=”150″ width=”232″ ></iframe>
    </div>

    if you can see the link from youtube and how the wordpress is translated it, they a little different so make sore to change to the right one, see the sample below.
    the youtube code = http://www.youtube.com/watch?feature=player_profilepage&v=d8KK3xnEV34
    the wordpress code = src=”http://www.youtube.com/embed/d8KK3xnEV34?feature=oembed

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘YouTube Text Wrap’ is closed to new replies.