Archive not working
-
I made a custom template for my custom post type called archive-bc_equipment.php and it is not being called; archive.php is still called. On the other hand, single-bc_equipment.php does work. Any help is appreciated.
Here is the relevant code.
<?php define('MU_PLUGIN_PATH', ABSPATH . 'wp-content/mu-plugins'); define('BC_PREFIX', 'bc_'); function bc_prefix($string='', $safe=true) { if (!$safe) { return BC_PREFIX . $string; } else { return (strpos($string, BC_PREFIX) === 0) ? $string : BC_PREFIX . $string; } } require(MU_PLUGIN_PATH . '/super-cpt/super-cpt.php'); add_action('after_setup_theme', 'bc_setup_post_types_taxonomies'); function bc_setup_post_types_taxonomies() { $equipment = new Super_Custom_Post_Type(bc_prefix('equipment'), 'Equipment', 'Equipment', array('rewrite' => array('slug' => 'equipment-fleet'))); $equipment_cat = new Super_Custom_Taxonomy(bc_prefix('category'), 'Category', 'Categories', 'category', array('rewrite' => array('slug' => 'equipment-category'))); connect_types_and_taxes($equipment, array($equipment_cat)); }
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Archive not working’ is closed to new replies.