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

Perry Garcia
Perry Garcia
593 Points

Still.having trouble posting

Can't seem to figure out how to place specific post on specific pages. Like Xbox new articles in the Xbox section and PlayStation on the PlayStation pages and general.gaming new on one page etc. It all just goes to my archives

2 Answers

Andrew McCormick
Andrew McCormick
17,730 Points

I may be missing a previous post, but how are you organizing these posts? Are these using a taxonomy or are they custom post types? Either way, you would just create a custom template for your page, and then modify the Wp_query to display only post of a certain type or by taxonomy.

Carmine Sarno
Carmine Sarno
19,660 Points

I'll take a stab at this. I'd do the following:

1) Create a different page for each post category (e.g. Xbox, PS, General).

2) Go into Wordpress Admin > Posts > Categories, and create a category for 'Xbox', one for 'PS', and another for 'General'. Note that each category has a 'slug' name that you need to input.

3) Go into each of your posts and make sure that the proper category is checked-off.

4) On each post page, implement a Wordpress loop using the wp_query object. You will need to query by something category related. To do that, set the wp_query arguments before you implement the loop code, most likely using the category slug name that you created in step 2: (example: $query = new WP_Query( 'category_name=xbox' ); ).
More info on that here: http://codex.wordpress.org/Class_Reference/WP_Query

I'm not positive that will work without some massaging, but that's how I would approach it. You could also make a Custom Post Type, which Zac Gordon shows in detail in the Wordpress Theme Development course.