I'm customizing a theme for a client from a theme they bought off of themeforest.net. I created a child theme, where all the customization is located.
Here is the issue: There are several custom post types in the parent theme that work perfectly if you use the parent them. But as soon as the child them is activated, I get 404 errors.
- I've flushed rewrite rules and changed and saved the permalink, but no help.
- The parent theme's CPT shows in the admin backend, just not on the frontend.
- I added a cpt to the child theme and it works perfectly.
ADDED: In the parent theme, the cpts are registered in a custom class with the class instantiated in the functions.php without a hook.
Here are the cpt parameters that are passed to the class when instantiated:
/* The Custom Post Types */ 'post-types' => array( 'gallery' => array( 'plural' => 'galleries', //plural : optional, but usefull in this case ), 'release' => array( 'menu_name' => 'Discography', ), 'review' => array( 'supports' => array('title','editor','thumbnail', 'comments'), 'exclude_from_search' => false ), 'show' => array(), 'item' => array( 'menu_name' => 'Store', ), 'video' => array( 'hide_text_editor' => true, 'seo' => false ),
Here is the snippet in the CPT class for registering the cpt:
$args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => false, 'rewrite' => array( 'slug' => $slug ), 'capability_type' => 'post', 'has_archive' => false, 'hierarchical' => false, 'menu_position' => 5, 'taxonomies' => array(), 'supports' => $supports, 'exclude_from_search' => $exclude_from_search, ); register_post_type($id, $args);