Created
April 8, 2015 04:40
-
-
Save michaelschofield/810d5b7a9bb93ce08417 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// The function to create a taxonomy archive within a | |
// plugin is nearly identical to creating the post type | |
// archive, except instead of using is_post_type_archive() | |
// we use is_tax(). | |
function advwp_create_series_template( $archive ) { | |
global $post; | |
if ( is_tax( 'series' ) ) { | |
return plugin_dir_path( __FILE__ ) . 'public/templates/taxonomy-series.php'; | |
} | |
return $archive; | |
} | |
add_filter( 'archive_template', 'advwp_create_series_template' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment