<?php

use Timber\Timber;

$context         = Timber::context();
$timberPost      = Timber::query_post();
$context['post'] = $timberPost;

if(post_password_required($timberPost->ID)) {
    Timber::render('single-password.twig', $context);
} else {
    Timber::render([
        'single-' . $timberPost->ID . '.twig',
        'single-' . $timberPost->post_type . '.twig',
        'single-' . $timberPost->slug . '.twig',
        'single.twig'
    ], $context);
}