How to Easily Embed a Part of a YouTube Video in Your Website

Sometimes you may want to show your website visitors a certain part of a YouTube video instead of the full video.
For example, you want to show your visitors a funny scene from a full movie on YouTube or you just want to escape the boring introduction and start the video from the important part.
Well, it’s very easy to do that, all you need is to add some parameters to the end of the YouTube video URL.
Here’s how to do it:
1 – First, go to the page of the YouTube video you want to embed.
2 – Below the video, click Share then click Embed.
3 – Copy the embed code by clicking on Copy.

This is how the video embed code looks like:

<iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/vy38NLQeZJM” frameborder=”0″ allow=”accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture” allowfullscreen></iframe>

This is the URL of the video:

“https://www.youtube.com/embed/vy38NLQeZJM”

4 – Go to your WordPress Post Editor, click Add Block, scroll down to Formatting and click Custom HTML.
5 – Paste the embed code and at the end of the URL add ?start=seconds&end=seconds then change seconds with the time in seconds.

For example, if you want the video to start at 14:50(14 minutes and 50 seconds), convert 14:50 to seconds, that’s equal to 14*60+50=890 seconds.

This is how the final code looks like:

<iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/vy38NLQeZJM?start=890&end=1350” frameborder=”0″ allow=”accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture” allowfullscreen></iframe>

Video starts at 890 seconds(14:50) and ends at 1350 seconds(22:30).

If you only want to start the video at a certain time and let it play through the end, remove &end=seconds.

<iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/vy38NLQeZJM?start=890” frameborder=”0″ allow=”accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture” allowfullscreen></iframe>

If you want the video to start from the beginning and to end at a certain time, remove start=seconds&.

<iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/vy38NLQeZJM?end=1350” frameborder=”0″ allow=”accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture” allowfullscreen></iframe>