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

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

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.