Wp?Query problem

I have a Wp_Query to loop through my custom post types, however it seems to be wrong but I can’t see the mistake. After the post thumbnail, I can see (“>) as if some tag wasn’t closed correctly, but i have tried a few different things to no avail.

<?php

    $args = array(
         "post_type" => "piso"
    );

    $the_query = new WP_Query( $args );

    ?>

<?php if( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

    <div class="pisos-grid-item-wrap">

        <a href="<?php the_permalink(); ?>">
            <img src="<?php the_post_thumbnail( 'post-thumbnail', array('width'=>'270') ); ?>">
        </a>

        <h1> <?php echo $precio ?> € </h1>
        <h2> <?php the_title(); ?> </h2>
        <h3> <?php echo $donde ?> </h3>

    </div>

<?php endwhile; endif; ?>

A screenshot of the problem

Read more here: Wp_Query for custom post type not showing properly


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: