Page Templates in Custom Post Types
-
Hi guys,
I’m trying to use a different page templates with a custom post type I’ve created, but I can’t get the option to show up even though I’ve followed all the guides to doing so to the letter.
Here’s the code i’m using at the top of the page template:
<?php /* Template Name: Hub */ ?> <?php get_header(); ?>
Here’s the code i’m using to create the custom post type:
register_post_type('hubs', array( 'menu_icon' => get_bloginfo('template_directory') . '/images/reviews.png', // Icon Path 'label' => 'Hubs', 'public' => true, 'show_ui' => true, 'capability_type' => 'page', 'hierarchical' => true, 'query_var' => true, 'supports' => array( 'title', 'editor', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'thumbnail', 'author', 'page-attributes',) ) );
and here’s the filename I’ve given the page template:
“page-xboxhub.php”.Any guidance you guys could offer would be greatly appreciated.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Page Templates in Custom Post Types’ is closed to new replies.