You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
cosmopet-architecture/wp-content/themes/cosmopet/single.php

26 lines
652 B

<?php
/**
* The Template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*/
namespace App;
use Timber\Timber;
$context = Timber::context();
$post = $context['post'];
if ( is_singular('post') ) {
include_module('blog');
include_component('blog', 'single');
} elseif ( is_singular('blog_author') ) {
include_module('author');
include_component('author', 'author-single');
} else {
// Для других типов записей
$templates = [ 'views/single-' . get_post_type() . '.twig', 'views/single.twig' ];
}
Timber::render( $templates, $context );