WordPress loop: Show only a Custom Post Type Taxononmy TERM

I found the solution by myself, I leave it here in case someone is interested:

<?php  $args = array(
'post_type' => 'agrupados',
'tax_query' => array(
    array(
        'taxonomy' => 'pedidos',
        'field'    => 'slug',
        'terms'    => 'ferrol',
    ),
),);  $the_query_slide = new WP_Query( $args );  if ( $the_query_slide->have_posts() ) {while ( $the_query_slide->have_posts() ) {$the_query_slide->the_post();?>





            <?php
            /* variables para cada imagen */
                $full = get_the_post_thumbnail_url(get_the_ID(),'full'); 
                $large = get_the_post_thumbnail_url(get_the_ID(),'large');          
                $medium = get_the_post_thumbnail_url(get_the_ID(),'medium');
                $thumbnail = get_the_post_thumbnail_url(get_the_ID(),'thumbnail'); 
            ?>

    <div class="col col-md-flex-6 col-lg-flex-3 ">

        <picture class="cat-agrupados-img">
        <source media="(min-width: 768px)" srcset="https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/<?php echo esc_url($thumbail); ?>">
                <img src="https://wordpress.stackexchange.com/questions/320836/<?php echo esc_url($medium);?>" alt="<?php the_title(); ?>">
        </picture>  

        <h2 class="cat-agrupados-titulo-pedido">Pedido agrupado en <?php the_title(); ?></h2>

        <p class="cat-fecha-publicacion">Fecha de publicación: <strong><?php the_date(); ?></strong></p>

        <p class="cat-agrupados-zona">Zonas: <strong><?php echo get_post_meta( get_the_ID(), 'yourprefix_agrupados_poblaciones', true ); ?></strong></p>


        <a href="<?php the_permalink(); ?>" class="cat-agrupados-link">Ver pedido agrupado</a>


    </div> <!--cierre columna-->



<?php }} wp_reset_postdata(); ?>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)