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

Custom page instead of custom post?

Instead of creating another section called Portfolio unit post types, can we make it so they are pages? I want to create multiple page sections in the admin area called "Communities", "Team Members" etc for my real estate page and I want to be able to swap the page templates depending on the page content? ... or is there a way to apply custom page templates to the posts?

2 Answers

Hi Stephen,

Can you give be a little more info on the content of the site so I can better direct you to a solution?

From what I am gathering you want to control the layout of your content a little more than the default WP Admin will allow for? Be that post or pages you want the freedom?

Let me know :)

Craig

Hi Craig, thank you for your response. I think I jumped the gun in asking my question. The following tutorial explained how to set up a custom template for "custom post type" by just setting up "single-$postype.php". I guess I just get confused that it has to be a "post-type" not "page-type". When I think post, I think blog post and I'm more trying to create different page templates that I can also create the different fields within those pages, if that makes sense.

I would like to just click "create a page" and then within the new page select from different page template options such as "community" or "team member". From there, say for the "community" page template, I want to create input fields that will take: images for a slider, community address, description, amenities, general info/facts section and a section where I can put <script> codes that will connect to an IDX field to display MLS listings. I have at least 80-100 communities I will be including so I'm trying to just make 1 page template that will then replicate all the pages, I would just have to input info. I can probably do all this with the custom post type, but like I said, I just got confused when it said post and not page. I think I can make it work, just need to learn more code.

Here is my current website: http://eastvalleyurban.com - I want to build something very similar in concept.

At this point, I think I'm in the right direction, I need to just keep moving forward with the tutorials.