- tutto il sito", "design_scuole_italia" );
- } else if ( $_GET["type"] == "school" ) {
- $str = __( "nel materiale relativo alla scuola", "design_scuole_italia" );
- } else if ( $_GET["type"] == "news" ) {
- $str = __( "in notizie ed eventi", "design_scuole_italia" );
- } else if ( $_GET["type"] == "service" ) {
- $str = __( "nei servizi", "design_scuole_italia" );
- } else if ( $_GET["type"] == "education" ) {
- $str = __( "nella didattica", "design_scuole_italia" );
- } else if ( $_GET["type"] == "class" ) {
- $str = __( "nelle materiale relativo alle classi", "design_scuole_italia" );
- }
- }else{
- $str = __( "in base ai filtri selezionati", "design_scuole_italia" );
+
+
+ ";
+ } ?>
+
+ label === "Articoli") {
+ // Special link for "Articoli"
+ $link = 'tipologia-articolo/articoli/';
+ } else {
+ // Default link
+ if (isset($post_type->rewrite['slug']) && is_array($post_type->rewrite)) {
+ $link = esc_url('/' . $post_type->rewrite['slug']);
+ } else {
+ // Handle the case where rewrite or slug is not available
+ $link = esc_url('/');
+ }
+ }
+
+ // Escape the label for output
+ $post_type_links[] = '' . esc_html($post_type->label) . '';
+ }
+ }
+
+ echo implode(' ', $post_type_links);
+ }
+
+
+ if (isset($_GET["post_types"])) {
+ // Sanitize input
+ $post_types = array_map('sanitize_text_field', $_GET["post_types"]);
+
+ $post_type_links = array();
+
+ foreach ($post_types as $post_type_name) {
+ $post_type = get_post_type_object($post_type_name);
+
+ if (!empty($post_type)) {
+ // Check if the label is "Articoli"
+ if ($post_type->label === "Articoli") {
+ // Special link for "Articoli"
+ $link = 'tipologia-articolo/articoli/';
+ } else {
+ // Default link
+ if (isset($post_type->rewrite['slug']) && is_array($post_type->rewrite)) {
+ $link = esc_url('/' . $post_type->rewrite['slug']);
+ } else {
+ // Handle the case where rewrite or slug is not available
+ $link = esc_url('/');
+ }
+ }
+
+ // Escape the label for output
+ $post_type_links[] = '' . esc_html($post_type->label) . '';
+ }
}
- echo " ".$str;
- ?>
-
+ found_posts < 1) {
+ $result = "Nessun risultato";
+ } else if ($wp_query->found_posts < 2) {
+ $result = $wp_query->found_posts . " risultato";
+ } else {
+ $result = $wp_query->found_posts . " risultati";
+ }
+ echo $result . " ";
+ ?>
+
+
+
+