File: /var/www/hcv/wp-content/themes/hockey/single-tutorial.php
<?php
$context = Timber::context();
$post = new Timber\Post();
$video = get_field( 'youtube_link', $post->ID);
preg_match('/src="(.+?)"/', $video, $matches_url );
$src = $matches_url[1];
preg_match('/embed(.*?)?feature/', $src, $matches_id );
$id = $matches_id[1];
$id = str_replace( str_split( '?/' ), '', $id );
$post->youtube_embed = "https://www.youtube.com/embed/" . $id;
$context['tutorial'] = $post;
$context['support_page_template'] = get_field('support_page_template', 'options');
Timber::render( array( 'single-tutorial.twig', 'page.twig' ), $context );