Here is the Code →

public function widget($args, $instance) {
        extract( $args );
        $title = apply_filters( 'widget_title', $instance['title'] );

    /* Display the markup before the widget. */
    echo $before_widget;
    if ( $title ) {
        echo $before_title . $title . $after_title;
    }
    /* Create a custom query and get the most recent 6 projects. */
    $queryArgs = array(
        /* Do not get posts from the Uncategorized category. */
        'cat' => '-1',
        /* Order by date. */
        'orderby' => 'date',
        /* Show all posts. */
        'posts_per_page' => '2'
    );
    $query = new WP_Query( $queryArgs );
    if ( $query->have_posts() ) : ?>
        <ul class="bullet-un">
        <?php while ( $query->have_posts() ) : $query->the_post(); ?>
            <li class="snippet-box vertical">
                <div>
                    <!-- <img src="http://heightandweights.com/wp-content/uploads/2014/10/Beautiful-Lindsey-Vonn.jpg" alt="" class="hundred"> -->
                    <?php the_post_thumbnail( 'large', array( 'class' => 'img-responsive' ) ); ?>
                    <div class="snippet-text">
                        <h3><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"></a></h3>
                        <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
                    </div>
                </div>

            </li>
        <?php endwhile; ?>
        </ul>
    <?php endif;
    /* Display the markup after the widget. */
    echo $after_widget;
}

Although the widget Title is getting displayed, but the Post part is not getting displayed. what mistake am I committing?

hee is the Live WP website, and
Here is the Live HTML website.

Read more here: Post Widget Now displaying on the front Page, although Title is displaying


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: