Slider won’t work with custom query

For this example I used a fake category called “Slider Category” you will need to create that or replace that section of the code.

<? $query = new WP_Query( array( 'category_name' => 'Slider Category' ) ); ?>

   <div class="wrapper">
    <div class="list_carousel responsive">
        <ul id="desliza">
            <?php  while ( $query->have_posts() ) : $query->the_post(); ?>
                <li>
                    <div class="feattitle"><a href="https://wordpress.stackexchange.com/questions/239724/<?php the_permalink() ?>" rel="bookmark"><?php the_title() ;?></a></div>
                    <?php if ( has_post_thumbnail() ) {the_post_thumbnail('destaque', array( 'itemprop' => "image"));} else { ?>
                        <img src="<?php bloginfo('template_directory'); ?>/images/base-thumb.png" alt="<?php the_title(); ?>" />
                    <?php } ?>
                </li>
            <?php endwhile; ?>
        </ul>
    </div>
</div>