Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MasterHans/98cce4c43caa6da9e85d to your computer and use it in GitHub Desktop.
Save MasterHans/98cce4c43caa6da9e85d to your computer and use it in GitHub Desktop.
if (have_posts()) : query_posts ( ['cat' => $cat_id, 'meta_key' => 'post_sort_num', 'orderby' => 'meta_value_num', 'order' => 'ASC' ])?>
<?php while (have_posts()) : the_post(); ?>
<div class="col-md-4 column">
<div class="service-block">
<div class="service-image">
<?php echo the_post_thumbnail( [355,148] ); ?>
<i class="fa <?php echo get_post_meta($post->ID,'font_awesome',true) ?>"></i>
</div>
<h3><?php the_title() ?></h3>
<?php the_excerpt(); ?>
<a href="<?php echo get_category_link($cat_id) . '#' . $post->post_name; ?>" title="<?php echo get_cat_name($id) ?>" title="">УЗНАТЬ БОЛЬШЕ</a>
<?php wp_reset_postdata(); ?>
</div>
</div>
<?php endwhile; endif; wp_reset_query() ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment