Will your Portfolio be:
1) Part of your blog
2) A Static Page
3) A Custom Post Type
Hey Chip,
My portfolio is currently setup to pull based off of a custom post type called “Portfolio”.
Reference the Template Hierarchy.
For your “Portfolio” custom post type:
1) Create a “archive-portfolio.php” as the template file for Portfolio post index (if needed)
2) Create a “single-portfolio.php” as the template file for the single-post view for Portfolio posts.
So how would it know to use the single-portfolio.php page to load my individual portfolio items????
So how would it know to use the single-portfolio.php page to load my individual portfolio items????
Because WordPress is awesome like that! 😉
No, really: the template hierarchy system is setup for this very reason:
1) Single “Post” Post-type: use single.php
2) Single “Page” Post-type: use page.php
3) Single “Custom” Post-type: use single-custom.php
When you register your Custom Post Type, you assign it a slug, e.g. “portfolio”. WordPress then knows what to do with “portfolio”, and how to apply templates to “Portfolio” Post-types.
Awesome. Thanks Chip. Appreciate the quick help.