WP_Query generating conflict on the page

I'm creating a query using some filters and it's working, but below the code it doesn't run anything else and it doesn't show the footer

Could you help me with what I'm doing wrong?

I'm trying to run the code below:

page.php

    <?php 
    if(is_page( 1182 )){
    
    include_once("ConteudoFiltroParceiros.php");
    include_once("FiltroParceiros.php");
    include_once("FooterFiltroParceiros.php");
     
     } ?>

FiltroParceiros.php

<div class="contentFilt">

<?php 

$args = array(
    'post_type' => 'parceiros',
    'orderby' => 'date',
    'order' => 'asc',
    'paged'    => get_query_var('paged') ? get_query_var('paged') : 1
);
    
    if( isset( $_GET['segmento'] ) && isset( $_GET['loja'] ) && isset( $_GET['estado'] ) && isset( $_GET['cidade'] )){
            $args['tax_query'] = array(
              array(
              'taxonomy' => 'segmento',
              'terms' => $_GET['segmento'],
              'field' => 'slug',
              'include_children' => true,
              'operator' => 'IN'
              ),
              array(
                  'taxonomy' => 'loja',
                  'terms' => $_GET['loja'],
                  'field' => 'slug',
                  'include_children' => true,
                  'operator' => 'IN'
              ),
              array(
                  'taxonomy' => 'estado',
                  'terms' => $_GET['estado'],
                  'field' => 'slug',
                  'include_children' => true,
                  'operator' => 'IN'
              ),
              array(
                  'taxonomy' => 'cidade',
                  'terms' => $_GET['cidade'],
                  'field' => 'slug',
                  'include_children' => true,
                  'operator' => 'IN'
              ),
            );
    }

$query = new WP_Query( $args );
if( $query->have_posts() ) :
    while( $query->have_posts() ): $query->the_post();
        echo '<div class="blocoFilt">';
        echo get_the_title();
        echo the_content();
        echo '</div>';
    endwhile;
    echo '<div class="blocoPag">';
    echo paginate_links( array(
                        'base' => str_replace( 999999999, '%#%', get_pagenum_link( 999999999 ) ),
                        'format' => '?paged=%#%',
                        'current' => max( 1, get_query_var('paged') ),
                        'total' => $query->max_num_pages,
                        'prev_next' => true,
                        'prev_text' => 'Página Anterior',
                        'next_text' => 'Próxima Página',
                        /*'before_page_number' => '-',
                        'after_page_number' => '>', */
                        'show_all' => false,
                        'mid_size' => 3,
                        'end_size' => 1
                    ) );
    echo '</div>';
    wp_reset_postdata();
else :
    echo 'Nenhuma loterica encontrada!';
endif;
wp_reset_postdata();
die();
wp_reset_query();
 ?>

</div

I tried to use wp_reset_query and wp_reset_postdata to try to fix this bug, but without success, could you help me?


You are using die(); which will stop anything else from happening.

endif;
wp_reset_postdata();
die(); // Remove
wp_reset_query();

https://www.php.net/manual/en/function.die.php

die — Equivalent to exit

https://www.php.net/manual/en/function.exit.php

exit — Output a message and terminate the current script