As Andy said, WordPress will load the correct posts for you. You don’t need a custom query. When you’re viewing a custom post type or taxonomy archive the main loop will already have the correct posts based on the URL.
So you don’t need any of this:
$taxes = array( 'libro_de_hadiz' , 'asunto');
$terms = get_terms( $taxes );
echo $terms;
$paged = ( get_query_var( 'paged' ) ) ? absint ( get_query_var( 'paged' ) ) : 1;
$args = array( 'post_type' => 'hadices',
'posts_per_page' => 6,
'paged' => $paged,
));
$loop = new WP_Query( $args );
Then $loop->have_posts()
and $loop->the_post()
should just be have_posts()
and the_post()
.
Also, you got a bit carried away and added $loop->
where it doesn’t make sense. You should remove it from everywhere else too.