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

Kevin Korte
Kevin Korte
28,149 Points

Wordpress - Can you direct a post to show up on only one of multiple pages?

Maybe Zac Gordon or someone else can help me with this.

What I need is some sort of structure like this for a wordpress site...maybe wordpress isn't going to be the right CMS for this, which is an option I'm open too.

I need to display technical data for machines...lots of machines. So a structure like so:

ATV - UTV - Motorcycle - Snowmobile

Under each one of the 4, have the brands. For instance:

Brand A - Brand B - Brand C - Brand D - Brand E

Under a particular brand a year For Instance:

2013 - 2012 - 2011 - 2010 - 2009 - 2008 - 2007 -

And than depending on the year picked, a list of post for all of the different machines that are of that year, that brand, and that type.

Is there any way to direct a post of information to a page with this many variable in wordpress. I haven't seen any way in the Codex and reading about the loop to figure it out.

Thanks for any help.

5 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Do you mean how to have page content above the listing of the products? Something specific to the "category" or Brand/Price etc?

This would have to be done in the custom template you're using. You can save the descriptions as category descriptions and then display them conditionally on the right page depending on where you are in your taxonomy hierarchy.

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

You could likely do this with a custom taxonomy (categories). Then you could display a navigation using them and only the related content would display in each one.

Kevin Korte
Kevin Korte
28,149 Points

Hi Zac, thanks for the fast response.

This sounds do-able, I just need to go read up on taxonomies it sounds.

What exactly I mean is for each individual machine I'll have a table of sorts that has many part numbers, technical data, torque vales, etc. Posts will work to display this data, but I need a way to structure it so it's easy to find given all the different years, makes, and models. None will be exactly the same.

I was thinking about it more, and maybe having a page that has a dropdown menu to select the make, and than another dropdown menu to select the year, which would return all posts that fit that year and make might be an easier way to go. That would return a list of post on average no larger than 20-30 where the user could select their model of machine.

My template is currently just the basic bootstrap template you built on the treehouse blog.

I'll see what I can do, thanks for the advice.

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Yeah, I think this approach could work for you :)

Read up on taxonomies and you should be able to map them to the way you want to organize the entries.

There are some table wysiwyg plugins that would help you easily enter all the data. You will have to retype a bit of the info but it would be technically fairly simple.

Hope that helps!!

ps - it will require editing the templates so I would check out the more recent how to build a theme videos to prep for creating your custom templates.

Kevin Korte
Kevin Korte
28,149 Points

I believe I'm up to date on your second series, and I'll certainly stay up as more of those lessons come out. I think I will go back and refresh on those. Always pick up new things the second time through. Works out well cause I can see what you do, and figure out a way to translate that approach to my specific needs! :)