I have a WordPress-blog with gift ideas where I write text based articles. I recently discovered Custom Post types which I believe is the solution to an feature I want to create.
What I want:
- Be able to tag each custom post using the normal “Categories” and “Tags”.
- Create a 3×3 matrix with product images (custom posts) to be shown on top of each Category-view or Tag-view (followed by the typical article list in the category or tag).
Example:
- Lets say I have a category “Gifts for mom” and tags “Pink”, “Cheap”
- In the category “Gifts for mom” I have 10 text articles (normal posts) discussing the difficulties of buying gifts for your mom
- I create nine custom posts, each is a specific gift (e.g. A pink hairbrush). I want to place them in the Category “Gifts for mom” and tag them with “Pink”.
- When I view myrandomgiftblogname.com/category/gifts-for-mom I want to be able to get a view:
Gifts for mom
Product Product Product
Product Product Product
Product Product Product
Articles:
– This awesome article
– That awesome article
– Etc
I assume this is possible but don’t really know where to begin. Could you point me in the right direction? Which Plugins do I need? Do I need to do any programming myself (or just plugin configuration)? Is this even possible?
The description is a bit broad, hence a bit broad answer.
Two things are needed:
1) A plugin to create the Custom Post Type.
It is considered best practice to let CPT’s in Plugin territory. So you can swap designs and preserve your CPT functionality. In reality, you are asking for future problems letting this be handled by the theme.
Create your own plugin, which would contain a
register_post_typeand any extra configs.Use an existent plugin, like Custom Content Type Manager.
Its Custom Fields features are quite handy as well.
2) Learn how to use and customize WordPress Templates