<div class="container">
                <div class="row">

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


                    <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="">
                                <h5>Mechanical Engineering</h5>

                            <p><?php echo wp_trim_words(get_the_content());?> </p>

    <?php endwhile; wp_reset_query(); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.