Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

How to Sort Custom Taxonomy List WordPress

  • SOLVED

I've got a situation where there are a lot of custom categories with children and the site is only to show posts at the end of the line. Otherwise it should show a link to the category that's the next step down.

My Custom Post Type is : projects
My Custom Taxonomy (hierarchical) is: industry

A project can have sub-projects, and in that case it is just added as a child in the 'industry' category. Referring to the example below, "Cafeteria" would be a sub-project of "Blue State University" and as such, "Blue State University" was added as a child category of "University"

Example:
Academic (Custom Category)
--University (Custom Category)
---Blue State University (Custom Category)
----Cafeteria (Post)
----Gym (Post)
----Library (Post)
---Red State University (Post)
--Community-College (Custom Category)
--k/12 (Custom Category)

Commercial (Custom Category)
--Restaurant (Post)
--Office Building (Post)

Healthcare (Custom Category)
--Doctor's Office (Post)
--Dentist Office (Post)

Using the example above, if you were to go to the "University" taxonomy.php / archive.php, the list should show two links, "Blue State University" & "Red State University." Clicking on the Red State University link would take you to that, single.php, however, clicking on "Blue State University" would take you to that taxonomy/archive page that listed the links for "Cafeteria" , "Gym", & "Library." Those links would go to their, single.php pages.

Now, to complicate things even further, each single "project" has an "active" or "inactive" post_meta assigned to it. So the list needs to be listed as active first, then inactive.

If this needs to be handled a different way, I'm open to ideas also.

An exact example of what I'm trying to accomplish can be found here:
http://www.lhpa-nc.com/category/academic/university

Answers (2)

2013-03-29

juan manuel incaurgarat answers:

Hello Kevin:

I can work on it following the pattern you proposed. I've worked recently on a site with categories, sub-categories and diferent behaviour for them (here http://glaube-sa.com.ar/productos/ it doesn't have as many categories as yours though, but it should be similar).

If you wish to contact me, my email address is [email protected] and my portfolio if you need it is kilinhead.com

Thanks you

Juan

2013-03-29

Arnav Joy answers:

I think i may need access to your site to make it work like you want , if you are up for it then send me access at : [email protected]