How to Add Timestamps To Embedded YouTube Videos

Home WordPress How to Add Timestamps To Embedded YouTube Videos

April 29, 2021

In this video I will show you How to Add Timestamps To Embedded YouTube Videos.

The great thing about this code is you can use it on any type of website, so this isn’t just limited to WordPress websites. You can use this code anywhere you can enable Javascript on the page.

Elementor (Affiliate Link):

YouTube Javascript Code

					<div class="responsive-container"><div id="player"></div></div>
      var tag = document.createElement('script');
      tag.src = "";
      var firstScriptTag = document.getElementsByTagName('script')[0];
      firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
      var player;
      function onYouTubeIframeAPIReady() {
        player = new YT.Player('player', {
          videoId: 'S4cZjaXmuzE',
      function setCurrentTime(slideNum) {
        var object = [ 0, 133, 193 ];



 	<li><a href="javascript:void(0);" onclick="setCurrentTime(0)">0:00 Intro</a></li>
 	<li><a href="javascript:void(0);" onclick="setCurrentTime(1)">2:13 1 Minute Challenge</a></li>
 	<li><a href="javascript:void(0);" onclick="setCurrentTime(2)">3:13 Website Speed Results</a></li>
<input type="button" value="1 minute challenge" onclick="setCurrentTime(2)" />

CSS Code

					.responsive-container {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	padding-top: 0px;
	height: 0;
	overflow: hidden;

.responsive-container iframe,
.responsive-container object,
.responsive-container embed,
.responsive-container video
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;

*Some of the links on this page are affiliate links, meaning we may receive a commission if you follow them. This allows us to continue providing free content and educational resources for you. Thank you for supporting our small business!

More Free Resources

Join Our Community

Wicky Design YouTube

Get our latest videos by subscribing for FREE to our YouTube channel. New videos are uploaded weekly!

Join Our Community

Join now to receive helpful resources, tips, and tutorials in your inbox.