Ok, but I was afraid it’s not really a good solution. Works, though.
First, I rewrote the query in order to get pretty permalinks:
/*Añadido: Reescribir URL query: "?pa_dispositivo=nombre&pa_marca=nombre"*/
function custom_rewrite( $wp_rewrite ) {
$feed_rules = array(
'tipo/(.+)/marca/(.+)' => 'index.php?pa_dispositivo='. $wp_rewrite->preg_index(1).'&pa_marca=". $wp_rewrite->preg_index(2)
//"(.+)' => 'index.php?pa_marca=". $wp_rewrite->preg_index(1)
//"(.+)' => 'index.php?pa_dispositivo='. $wp_rewrite->preg_index(1)
);
$wp_rewrite->rules = $feed_rules + $wp_rewrite->rules;
}
// refresh/flush permalinks in the dashboard if this is changed in any way
add_filter( 'generate_rewrite_rules', 'custom_rewrite' );
/*Fin Añadido*/
This gives me something like site.com/name/tax1/name2/tax2.
Then, I modified the file that creates the divs contaning the query results. If the URL is “this” do echo “that”:
$uri = $_SERVER['REQUEST_URI']; //Sacamos la URL y los fragmentos de la URL
$pieces = explode("https://wordpress.stackexchange.com/", $uri);
$uri_prov= $pieces[2];
echo "<div class="breadcrumbsBusqueda">";
switch ($uri) {
case "/provincia/".$uri_prov."https://wordpress.stackexchange.com/":
echo "<a href="https://wordpress.stackexchange.com/">Inicio</a> › ".$uri_prov."</div>TEXT<div class="area_with_sidebar area_left">";
break;
default:
echo '<a href="https://wordpress.stackexchange.com/">Inicio</a> › Esto es lo que hemos encontrado para tu búsqueda: '.get_search_query().'</div><div class="area_with_sidebar area_left">'
//add as many cases as you need