$my_posts = get_posts(array(
'numberposts' => 0,
'category' => 14,
'orderby' => 'meta_value_num',
'meta_key' => 'skidka'
));
foreach ($my_posts as $post) :
setup_postdata($post);
?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php endforeach; ?>
$sort_tag = [];
foreach ($terms as $term) {
$sort_tag[$term->name] = esc_url(get_term_link($term->term_id));
}
ksort($sort_tag, SORT_NATURAL);
foreach ($sort_tag as $tag_name => $tag_url) {
echo '<li><a href="' . $tag_url . '">' . $tag_name .'</a></li>';
}
<php echo bloginfo('template_url'); ?>/
// или так
<?php echo get_template_directory_uri()?>/
if(pll_current_language() == 'en') {
echo do_shortcode( '[contact-form-7 id="1" title="Contact form 1" ' );
}
$modal_arr[get_the_ID()]['title'] = get_the_title();
$modal_arr[get_the_ID()]['content'] = get_the_content();
$modal_arr[get_the_ID()]['image'] = get_the_post_thumbnail_url();
function check_category () {
$categories = get_the_category();
switch ( $categories[0]->term_id ) {
case 4:
echo 'mafs';
break;
case 5:
echo 'reconstruction';
break;
case 6:
echo 'stock';
break;
case 7:
echo 'monolithic';
break;
}
}
<?php echo esc_url( home_url( '/wp-content/uploads' ) ); ?>