how to get custom post type description from category id
Question
<?php
$args = array( ‘post_type’ => ‘add_your_custom_post_type’, ‘posts_per_page’ => 10 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
the_title();
?>
<div class="col-lg-4 col-md-6">
<div class="service-item">
<div class="si-head">
<div class="si-icon">
<img src="<?php echo get_template_directory_uri(); ?>/img/icons/cogwheel.png" alt="">
</div>
<h5>Mechanical Engineering</h5>
</div>
<p><?php echo wp_trim_words(get_the_content());?> </p>
</div>
</div>
<?php endwhile; wp_reset_query(); ?>
0
customization
4 years
2019-11-05T15:07:07-05:00
2019-11-05T15:07:07-05:00 0 Answers
76 views
0
Leave an answer