[Plugin: Custom Post Template] custom post types
-
Hey, so support for custom post types isn’t working for me. The plugin is working on standard posts though.
I put this at the bottom on my functions.php file:
/** * Hooks the WP cpt_post_types filter * * @param array $post_types An array of post type names that the templates be used by * @return array The array of post type names that the templates be used by **/ function my_cpt_post_types( $post_types ) { $post_types[] = 'Items'; return $post_types; } add_filter( 'cpt_post_types', 'my_cpt_post_types' );I have one custom post type, named Items.
Is there some other code I need to put somewhere in addition to this?Also, in the Other Notes section on the plug-in’s page, it says “You can ALSO add this code to the functions.php file in your theme.” But it doesn’t say where it would be placed otherwise. Where does it go if you’re not putting it in functions.php?
Sorry if this a dumb question, I’m new to this.Thanks in advance, I’m looking forward to utilizing this plug-in!
The topic ‘[Plugin: Custom Post Template] custom post types’ is closed to new replies.