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

Konrad Pilch
Konrad Pilch
2,435 Points

WordPress Loop throw many things

HI,

Im a website where , i have blog , and i have done it, but now, i need to do something similar.

So i need to make a portfolio page so the user can add its resources . The resources need to be ' Projects ' and the other one needs to be ' Practice ' .

I believe to use Custome Post Type and put it in different TAB and add an title, link and image, but now, how do i separate them , and how do i loop them thorw the correct loop >?

The last page will require me to do a Resource page, basicaly he will post a picture and some text , similar to blog. WOuld this go into the loop as well? add image and text and for every resource pot it? oh and the resources needs to have different categories that he can add so e.g Text Eitors, Website to Learn from and then have the correct post under it .

Can somebody give me some clue at least please?

Stanley Thijssen
Stanley Thijssen
22,831 Points

You have to create a custom loop for your custom post types so it will only show the custom post type you have selected in your custom loop.

1 Answer

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

You should look at our WP Theme Development Courses that cover how to work with Custom Post Types:

Basically you will use WP_Query to create a custom loop. Make sure to reset it at the end too:

http://wordpress.stackexchange.com/questions/144343/wp-reset-postdata-or-wp-reset-query-after-a-custom-loop