Permalink
Browse files

latest

  • Loading branch information...
1 parent 970fe0c commit da7080bd93df12c37218c882a6a190c027fe4416 @xentek xentek committed Aug 16, 2011
Showing with 11 additions and 10 deletions.
  1. +4 −4 epic-post-type.php
  2. +7 −6 epic-taxonomy.php
View
@@ -83,7 +83,7 @@ function create_post_type($name, $singular_name, $slug, $icon, $args)
);
//Create Basic Default Options
- $options = array(
+ $options = array(
'labels' => $labels,
'description' => '',
'publicly_queryable' => true,
@@ -93,7 +93,7 @@ function create_post_type($name, $singular_name, $slug, $icon, $args)
'public' => true,
'rewrite' => array('slug'=>$slug),
'query_var' => $slug,
- 'supports' => array('title','editor','excerpt','thumbnail'),
+ 'supports' => array( 'title', 'editor', 'excerpt', 'custom-fields', 'revisions' ),
'register_meta_box_cb' => null,
'show_ui' => true,
'menu_position' => null,
@@ -102,9 +102,9 @@ function create_post_type($name, $singular_name, $slug, $icon, $args)
'can_export' => true,
'show_in_nav_menus' => true
);
-
+
//Merge Options With Passed Args
- $args = wp_parse_args($args, $options);
+ $args = wp_parse_args($args, $options);
//Register Custom Post Type
register_post_type( $slug , $args );
View
@@ -126,12 +126,13 @@ function template_redirection()
include( ABSPATH . 'wp-trackback.php' );
return;
elseif($wp->query_vars['taxonomy']):
- $inc = STYLESHEETPATH . '/' . $wp->query_vars['taxonomy'] . '/' . $wp->query_vars['term'] . '.php';
- if ( file_exists( $inc ) ):
- include( $inc );
- else:
- include( STYLESHEETPATH . '/archive-'.$wp->query_vars['taxonomy'] . '.php' );
- endif;
+ locate_template( array(
+ 'taxonomy-' . $wp->query_vars['taxonomy'] . '-' . $wp->query_vars['term'] . '.php',
+ 'taxonomy-' . $wp->query_vars['taxonomy'] . '.php',
+ 'taxonomy.php',
+ 'archive.php',
+ 'index.php'
+ ), true);
die();
endif;
elseif( in_array( $wp->request, $taxonomies ) ):

0 comments on commit da7080b

Please sign in to comment.