$terms = get_queried_object();
$photodik = get_field('block_foto_posle_abzaca_2','category_' . $terms->term_id);
<?php if ( $photodik) { ?>
<?php
foreach($photodik as $photo):?>
<div class="col-1-1 col-md-1-2">
<p style="text-align: center;"><a href="<?= $photo['foto']; ?>"><img alt="" src="<?= $photo['foto']; ?>" style="max-width: 100%;border-radius: 5px;" title=""></a></p>
</div>
<?php endforeach; ?>
<?php } ?>
public static function get_taxonomy_hierarchy( $taxonomy, $parent = 0 ) {
$taxonomy = is_array( $taxonomy ) ? array_shift( $taxonomy ) : $taxonomy;
$terms = get_terms( $taxonomy, array( 'parent' => $parent ,'hide_empty'=>0) );
$children = array();
foreach ( $terms as $term ){
$term->children = self::get_taxonomy_hierarchy( $taxonomy, $term->term_id );
$children[ $term->term_id ] = $term;
}
return $children;
}
public function get_taxonomy_hierarchy_multiple( $taxonomies, $parent = 0 ) {
if ( ! is_array( $taxonomies ) ) {
$taxonomies = array( $taxonomies );
}
$results = array();
foreach( $taxonomies as $taxonomy ){
$terms = get_taxonomy_hierarchy( $taxonomy, $parent );
if ( $terms ) {
$results[ $taxonomy ] = $terms;
}
}
return $results;
}
wp_add_inline_script('boost-script', 'const bost_type....');
<?php echo $this->renderPartial('@frontend/views/callback/index.php',["model" =>new Callback()]); ?>
<?php
function RusEnding($n, $n1, $n2, $n5) {
if($n >= 11 and $n <= 19) return $n5;
$n = $n % 10;
if($n == 1) return $n1;
if($n >= 2 and $n <= 4) return $n2;
return $n5;
}
echo RusEnding(2587, "день", "дня", "дней");