Make WordPress Core


Ignore:
Timestamp:
03/23/2008 05:02:11 PM (16 years ago)
Author:
ryan
Message:

Taxonomy queries and urls. Props andy. see #6357

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r7224 r7491  
    382382}
    383383
     384function get_taxonomy_template() {
     385    $template = '';
     386    $taxonomy = get_query_var('taxonomy');
     387    $term = get_query_var('term');
     388    if ( $taxonomy && $term && file_exists(TEMPLATEPATH . "/taxonomy-$taxonomy-$term.php") )
     389        $template = TEMPLATEPATH . "/taxonomy-$taxonomy-$term.php";
     390    elseif ( $taxonomy && file_exists(TEMPLATEPATH . "/taxonomy-$taxonomy.php") )
     391        $template = TEMPLATEPATH . "/taxonomy-$taxonomy.php";
     392    elseif ( file_exists(TEMPLATEPATH . "/taxonomy.php") )
     393        $template = TEMPLATEPATH . "/taxonomy.php";
     394
     395    return apply_filters('taxonomy_template', $template);
     396}
    384397
    385398function get_date_template() {
Note: See TracChangeset for help on using the changeset viewer.