how to get custom post type description from category id

<?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(); ?>

Read more here:: how to get custom post type description from category id

Leave a Reply

Your email address will not be published. Required fields are marked *