add vystavki

This commit is contained in:
2021-09-30 13:51:38 +03:00
parent 57858d1fbd
commit c2819573de
8 changed files with 258 additions and 30 deletions

View File

@@ -36,6 +36,24 @@ function mob_block($template){
}
//свой шаблон для категории
add_filter( 'single_template', function ( $single_template ) {
foreach( (array) get_the_category() as $cat ) {
if ( file_exists(TEMPLATEPATH . "/single-{$cat->slug}.php") )
return TEMPLATEPATH . "/single-{$cat->slug}.php";
}
return $single_template;
}, PHP_INT_MAX, 2 );
function kuri_set($name = null, $value = null) {
static $vars = array();