public static function handle_taxonomy() { global $query_string; $args = wp_parse_args($query_string, array('state' => false, 'city' => false, 'neighborhood' => false, 'zip' => false, 'street' => false, 'mlsid' => false)); extract($args); $templates = array(); if ($state || $city || $zip || $neighborhood || $street || $mlsid) { if ($street) { $templates[] = 'attribute-street.php'; } elseif ($neighborhood) { $templates[] = 'attribute-neighborhood.php'; } elseif ($zip) { $templates[] = 'attribute-zip.php'; } elseif ($city) { $templates[] = 'attribute-city.php'; } elseif ($state) { $templates[] = 'attribute-state.php'; } elseif ($mlsid) { $templates[] = 'attribute-mlsid.php'; } $templates[] = 'attribute.php'; self::$request = array_merge(self::$request, $templates); } else { $term = get_queried_object(); $taxonomy = $term->taxonomy; $templates[] = "taxonomy-{$taxonomy}-{$term->slug}.php"; $templates[] = "taxonomy-{$taxonomy}.php"; $templates[] = 'taxonomy.php'; } self::$request = array_merge(self::$request, $templates); }