I think we should change how the terms are taken when we are in a page.
I’d consider using get_queried_object() and take the term from there.
Example:
add_action( 'generate_before_main_content', function(){
if( is_tax('lieu') ){
$term = get_queried_object();
$settings = array(
'taxonomy' => 'lieu',
'tax_term' => $term->slug,
);
if ( function_exists( 'wpsp_display' ) ) {
wpsp_display( 78685, $settings );
}
}
});
so what this exactly does is, if the page is under taxonomy of lieu, it gets the queried term, assigns it as the query setting for WPSP and fire wpsp_display using the taxonomy ‘lieu’ and term slug of the current queried page.
This way, we’re always whatever the page term is will be the one WPSP uses. So for example, if the queried term of the page is paris-13, the term slug used will be ‘paris-13’ instead of getting a loop of terms.