Page template for multiple pages?
-
Hey guys.
Im using wordpress to create a site that sells sports equipment. I have some top level pages such as golf, basketball, soccer etc. Each of these has sub pages, and sub sub pages. Golf for example, has golf>clubs>putters. Basketball has basketball>balls>indoor. Each post is a product review and is assigned a category that reflects the page structure. For example, a callaway putter would be assigned to the category golf>clubs>putters. What im trying to do is show these posts on the correct pages based on their assigned category. How do i do this?
The main problem im having is that i dont want to create an individual page template for each category and sub category as i’ll end up with hundreds of page templates all doing the same thing. Am i correct in thinking that the best course of action is to create one page template for handling all top level category archives, and one for sub category and then one for sub sub category? If so can anyone help in writing the code?
Thanks, patrick
- The topic ‘Page template for multiple pages?’ is closed to new replies.