You should be able to create a single-your-post-type-name.php file and have it work. I currently have it working fine on 3 or 4 sites so if it’s not working for you you’re doing something wrong.
Based on your code sample single-artwork.php should work as a single page post template. You could also redirect on single.php with:
<?php
if( get_post_type() == 'artwork' ) {
include_once ( TEMPLATEPATH.'/path/to/template.php' );
} else {
include_once( TEMPLATEPATH.'/normal/template.php' );
}
?>
I’d prefer to see the single-posttype.php route since WordPress is doing the routing at a deeper level and it’s always nicer to just use WordPress built in stuff.
Related Posts:
- How to change the default registration email ? (plugin and/or non-plugin)
- Adding Page Attributes Metabox and Page Templates to the Posts Edit Page?
- Post/Page Preview Template
- TwentyTen: Overloading template.php files vs. get_template_part
- Grid layout “last” class to every third item
- Is it possible to have two different previews of a post (ie. two templates for one post)?
- Display page content AFTER a loop of posts
- How to add posts list to a page template?
- new page sidebar-template by default
- Using custom post template
- Custom templates vs page-slug
- Page attributes missing
- custom post template file not shown, instead all the time 404.php
- What are the main parts of a WordPress Template?
- Tell WP to use a specific template file in posts
- Create a custom posts page
- templates with page teasers Or Featured Items
- add_rewrite_rule and template redirect not working
- Theme keeps going to default files [closed]
- how to insert gravity newsletter subscription form in template
- Custom post type template not called
- single- and archive- templates not being applied to custom post types, not even after flushing permalinks
- Adding The Post Template Dropdown to WP-Admin
- How to make a template for a specific post of a custom post type?
- custom post type single page template not working
- How to include my own css in post
- Are there any downsides to not using get_header(), get_sidebar and get_footer()?
- wp_enqueue_style and different styles for blog template
- How to get link to homepage
- Different templates for same content, landing page from different URLs (generic, simple)
- Custom post types related to same custom post type?
- Use one template only for custom post type archives?
- Get URL of current post but not the page number
- Can I have both front-page.php and index.php?
- Is template name always same as directory name?
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- Dynamically switch template on click
- lost css when overriding themes templates
- How is WooCommerce cart.php template supposed to be used?
- Two exact templates, sidebar showing in one but not the other
- posts not showing on index.php
- Single Post Breadcrumb not linking back to Custom Post Type Index?
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- Trying to display short code content in template file with do_shortcode()
- Form post to WordPress page = wrong template
- What is the best practice to style archive page 2,3,etc differently than archive.php?
- Best practice for including plugin output in a template without using shortcode?
- Is there a more efficient way to loop through pages?
- Page template option missing
- Is there a way to by-pass the pagination function on one custom template?
- How do I get the page template name chosen?
- How to create a post template with two sidebars
- How can I add text to a specific ‘Edit Page’?
- Unable to add template to page set as Posts page in WP V 4.6.1
- Is it possible to register a new template file?
- Taxonomy term page going to 404
- Is it possible to customize the post according to post format in single.php?
- Customize rel=canonical tag for single blog post
- ACF costum date format [closed]
- How to use index.php as a template for archives?
- get_header(), get_footer() from plugin template
- a little direction on custom post type
- Trying to create a template without navigation and footer
- disable Tab post on nav-menus page (Admin)
- How can I use default CPT templates from sub-folder?
- How to customize WooCommerce templates to avoid override upon update [closed]
- Creating new content types (Pages, posts, testimonials, tigers, oh my!)
- How to set page title tag in custom template for non-Custom Post Type?
- What template is used for viewing Media Library Files?
- Automatically use specific template to load subpages
- get_month_link uses what wordpress template?
- != and !== both not always working? [closed]
- Hide a specific post from a page template
- Dynamically Insert Image Into Stylesheet
- Problem creating a custom category page with pagination
- Page template for a site from network
- Genesis – Adding custom hooks to display secondary navigation
- Format latest/newest post differently
- Custom taxonomy archive page problem
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- relating business and products with custom taxonomy?
- Best Way to Add UnEditable HTML to Posts
- If Posted After Date
- How to make different custom post layouts?
- WordPress as template engine
- Load custom script on a single template
- Remove portion of header code from home page only
- How safe is it to delete old posts edits to save database space?
- Two Custom Post Types with Identical Articles Competing for the same Slug
- Custom Post Type archive
- Use a separate template for the home page only
- WordPress custom post type with folder structure in slug
- Using setup_postdata() with multi-dimensional array
- How to access .html file that’s located in the theme folder from the browser?
- Is codex right on deleting post?
- Archive template limiting to 4 entries?
- how can I add a “read more” tag directly in the template?
- Why won’t pagination work?
- WordPress 3.3.1 single post template