0

I have six categories:

Seasons Categories:

  • Spring Summer
  • Fall Winter

Collections Categories:

  • Formal Wear
  • Night Wear
  • Ready to Wear
  • Sports Wear

I need to put them up in the navbar custom menu like so (upon client request):

  • Formal Wear
    • Spring Summer
    • Fall Winter
  • Night Wear
    • Spring Summer
    • Fall Winter
  • Ready to Wear
    • Spring Summer
    • Fall Winter
  • Sports Wear
    • Spring Summer
    • Fall Winter

Now, here is the first way I can do this: Create eight subcategories and fill in the four categories.

Second way would be to create two (the season categories) main categories and the subcategories would be the four collection categories. I have no idea if it's possible to make a child category share two parent categories.

Third way would be to make them all separate categories and make the menu item link to a page with two categories. How would I be able to do that? My permalinks are set to "mysite.com/category/fall-winter/".

My question is how can I solve this? I've already gone with the first solution, but I thought I'd ask if there's a better way before I go through with it. Which is the best solution?

  • You should be able to achieve this using the built-in WordPress Navigation Menus - codex.wordpress.org/Navigation_Menus. Without testing I'm not sure if you'd need to intercept the query and check which parent item's collection to show, but hopefully this will get you going. – David Gard Jan 26 '15 at 14:20
  • I already have a manu. I just want to know how the client or administrator can add a menu item for two categories. – yaharga Jan 26 '15 at 14:31
  • I don't get it? If you already have a menu, surely you know how you added items to that originally? – David Gard Jan 26 '15 at 14:44
1

I believe, most obvious choice would be to create two categories "Fall-Winter" and "Spring-Summer" and put four other categories in both of them. Your URLs would be like this

/category/fall-winter /category/fall-winter/formal-wear /category/fall-winter/night-wear

Now, to list the formal wear for both fall-winter and spring-summer on page, we have few following options

  1. Create formal wear etc as root categories, hide them in post editing screen and implement javascript to toggle them when their other counterpart categories are selected

you will get URLs like /category/formal-wear /category/night-wear

  1. Create pages for all 4 categories and use a shortcode (from a plugin or self develop) or write the page template to fetch posts from two categories and serve to browser.

URLs will look like this /formal-wear /night-wear

Someone may have better idea though...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.