I have a custom post type “recipes”. I created it using the custom post type UI plug in.
the name is ic_recipes, the label is Recipes and the rewrite slug is recipes
the url is formed as mysite.com/recipes/lentil-soup/
Here is the question…
I wanted to create the template file for this custom posts types to use..
but no matter what i tried, wordpress ended up using the single.php.
I’ve supplied the following files to the twentyten theme folder;
recipes.php
ic_recipes.php
archive-recipes.php
and finally archive-ic_recipes.php
none kicked in. single.php was the one every single time.
I checked the codex. codex has the the following to say ( I copy/pasted for you at the bottom of this question) about the the template naming!
Please tell me what is it that I’m missing..
http://codex.wordpress.org/Template_Hierarchy#Custom_Post_Types_display
Custom Post Types display
archive-{post_type}.php - If the post type were product, WordPress would look for archive-product.php.
archive.php
index.php
archive-xxx.php is for archives. You want to use single-xxx.php as an alternate to single.php.