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
- Any advantage to using get_header() over include(‘header.php’)?
- How to find the posts page (home page) programatically
- Find out who deleted a page or post?
- How to check if a shortcode exists?
- My ‘post attributes’ is missing from my WordPress install
- how “manage_posts_custom_column” action hook relate to “manage_${post_type}_columns” filter hook?
- Get templated page/post content via the WordPress API
- Check Title Unique Or Not and If not error message and dont save
- Force all images to full size in page template
- Login WordPress website using wp-rest api
- Global variable set in the template’s header.php is unable to echo in footer.php
- Get post id in wordpress action?
- When a link doesn’t exist, how to tell WordPress what to do? (404 Error Page)
- WordPress Schema.org Markup. What value does it add?
- What is this code trying to do? It was the cause of my 20s TTFB
- get_post_metadata() undefined when used in loop in RSS template
- the_excerpt producing empty output
- View Private Published Page with URL Code (no login required)
- I am unable to publish/update post
- Getting term description in single post template
- Cannot edit style.css from admin panel, because the template is looking for style.min.css
- How can I make site-wide content editable, for example footer content
- WordPress custom Query for Posts in Category display posts multiple times
- Add a custom meta box in the post options that loads some html code in the header
- Static posts page with home.php
- Custom posts in different columns style
- Best practice for including plugin output in a template without using shortcode?
- get_header(), get_footer() from plugin template
- If Posted After Date
- Using setup_postdata() with multi-dimensional array
- Update template without undoing all my edits?
- How to get and set the post tag value within WP Query from URL?
- how to set social icons to product / post template (Auros theme)? [closed]
- Editing a post template
- how to properly include or get file contents in a wordpress theme
- Is there a wordpress template like this [closed]
- WordPress Count posts within a custom post type
- How to create custom layouts and static pages in themes for clients
- Display a post via template
- Create theme for mobile phones and tablets only?
- Including template pages within another template?
- Custom post type tags not showing in search
- trouble calling different header.php for home.php
- Dynamic Sidebars based on page name
- How to output all taxonomy links from a custom post type in a menu?
- How Add Code in Page Index Custom Template?
- Editing my loop-page.php causes posts to show on all pages
- How do I change the template specifically for single posts?
- How can i conditionally load taxonomy-{taxonomy}.php template php files through functions.php
- Customizing a new page used for blog posts with Avada theme
- Search button click sends to single-custom_post_type instead staying at the same page
- How to invoke a HTML custom button based on a HTML dropdownlist menu
- WordPress site not loading styles on desktop?
- Display all page which have not a certain template
- ACF – Attach JS file depending on ACF field
- Custom Post Type Rewrite URL
- Custom Post Types and Broken Permalinks
- Still desperate about multiple TinyMCEs in widgets – is there any good solution to this yet?
- creating a custom post template
- Show Posts By Custom Field
- why get_header doesn’t work twice in a test
- Customize search results to include custom posts and display in a specific template page
- Custom permalink based on custom post type fields
- Taxonomy template by post type
- Best way to create a page outside of the pages list
- show Visual form builder in the front end
- why is this content-template not showing any of my blog-entries?
- Is there a list of all possible WordPress URL’s?
- Custom Post Title as search term
- How can I setup custom templates for a meta-data query
- Move Index to a page
- how to style an individual page in a category [duplicate]
- How to display page content and a list of posts on the same page?
- Looking for membership style plugin with edit option [closed]
- How edit footer copyright info? [closed]