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


How do i create a....

Hey im doing the "how to build a wordpress theme" and I was just wondering...lets say I want to make a projects section of my site....and when i click projects it takes me to the different categories of the projects(eg design, development) and then when i click on one of those categories it takes me the work page for the category where i can click on the individual projects to view them...

how to I go about this?

3 Answers

John Locke
John Locke
15,479 Points

Hi Stephenio:

There are a couple of ways to go about this. One way would be to set up individual pages for each Work category, and have links hard coded to those pages. For each of the category pages, you would have a custom template with a specific WP Query loop for the post type "work" and the category "whatever the category is here". EDIT: And look at that, Zac Gordon just released a Workshop on this very subject! https://teamtreehouse.com/forum/new-workshop-on-custom-wordpress-loops-with-wpquery

This assumes that you have your Projects as custom post types. There are countless references besides these, but basically, Custom Post Types are still work like posts, but they are given a specific name, so that you can filter them and use them how you want to. http://codex.wordpress.org/Post_Types http://wpmu.org/easy-guide-to-displaying-custom-post-types-in-your-wordpress-theme/

Another way to go about it, is to create a loop on your Project page that displays all of your Project custom post types, and you can link to the individual posts. If you are more comfortable with JavaScript or jQuery, you can highlight or show the specific projects in each category that is clicked on.

John Locke thank you! i'l looking into these options and see what I can come up with

Zac Gordon
Zac Gordon
Treehouse Guest Teacher

You can also check out the videos in the project about creating category pages :)