Custom template support for custom post type?

Please refer to the Template Hierarchy. Custom Post Types use two different template files, depending on context. For custom post type single post display: single-{posttype}.php single.php index.php For custom post type archive display: archive-{posttype}.php archive.php index.php In both cases, {posttype} is the custom post type $slug, as-defined in the register_post_type( $slug, $args ) call.

Custom post type as page template

Using a page template I inserted this code: <?php $args = array( ‘post_type’ => ‘productions’, ‘posts_per_page’ => 10 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); the_title(); echo ‘<div class=”entry-content”>’; the_content(); echo ‘</div>’; endwhile; ?> Works like a charm. Now I just need to customise the loop so it looks … Read more

Cross post type parent page added parent page to permalink but give 404

I think that you need only to change the way get_permalink create url for the cpt, ignoring the parent. You can do it adding a filter to ‘post_type_link’ hook and then regenerate the permalink for the product cpt in the same way is done in core, just ignoring the parent: add_filter(‘post_type_link’, ‘reset_light_link’, 999, 3); function … Read more