Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress WordPress Theme Development Custom Post Type Templates in WordPress The Portfolio Homepage

suyash patankar
suyash patankar
2,310 Points

where do you add those portfolio pages?

where do you add those portfolio pages? which is showing pink star image?

1 Answer

Joe Consterdine
Joe Consterdine
13,965 Points

Could someone elaborate on this please?

From my understanding so far:

  1. If you create a 'page-portfolio.php' template and have a 'portfolio' page in the admin these match up.
  2. If you create a custom post type and call it 'single-portfolio.php' then this will match up with your custom post type in your admin area.

I get that.

But what I don't understand in this video is how he's pulling off the featured images to the main 'page-portfolio.php'.

I'm assuming he's pulling it from the single-portfolio custom post type but I thought they were seperate?

All 'page-portfolio' content stays in that template and same with 'single-portfolio'.

Or is that from page-portfolio you can take data from the custom post type if you like?

Thanks!