Community Forums › Forums › Archived Forums › General Discussion › Custom Post Hierarchical Archive & Taxonomy Templates
Tagged: archive, CPT, Custom post, Custom Post Type, taxonomy, template, term
- This topic has 3 replies, 2 voices, and was last updated 10 years, 4 months ago by electricbrick.
-
AuthorPosts
-
June 25, 2014 at 4:08 pm #111335electricbrickParticipant
Recently I built a Faculty CPT-based plugin for our school's faculty member directory. The Faculty CPT has a single taxonomy of 'department' and the subsequent child terms of that taxonomy are our 5 main schools, followed by their respective academic departments as "grandchild" terms.
I'm attempting to create three templates (with little success):
- A master archive of all Faculty, separated by school and then department, with faculty organized by name and entries showing in 3 columns.
- A top-level school archive separated by department, and with faculty organized by name and entries showing in 3 columns.
A department-level archive with faculty organized by name and entries showing in 3 columns.
Here's what I have:
The above is partially derived from this tutorial.
I've also been wrestling with the following code, but still cannot seem to get these archives to work. Any guidance would be appreciated — please let me know if I'm omitting any other details that would be helpful.
http://su2.edu.70-32-99-102.electricbrick.co/blog/faculty/June 25, 2014 at 6:47 pm #111565carrieoke13ParticipantSo this may not be helpful at all, but I recently needed a page displaying all posts in my custom taxonomy, separated by terms (Which may be what your master archive would be?) I tried a gazillion tutorials and this is the one that finally worked for me:
http://vimodesigns.com/wordpress/how-to-list-all-posts-in-a-custom-taxonomy-separated-by-terms/ Just posting it in case there is something there to help troubleshoot your issue.Also - could you get the list working, and then do the columns with css instead of in the template? The archive portfolio template in the minimum pro theme or executive pro theme could be helpful.
June 26, 2014 at 9:22 am #111631electricbrickParticipantThanks, Carrie. This is a LOT closer, plus very simple and elegant. With this new code, the output is showing faculty under the parent terms and the child terms at the same time, however.
As far as the columns, I suppose I can use CSS, but for some reason I had it in my head that I was going to implement a grid loop in order to get each row to return cleanly and not have to rely on floats.
Again, thanks a million!
June 26, 2014 at 2:05 pm #111660electricbrickParticipantSo, I've been able to get my faculty bio info to show up in archives using your code, Carrie. Still can't figure out how to get it to not put faculty posts under the parent terms, or how to use the code to autodetect the slugs and only show department-related terms when in a specific department.
http://su2.edu.70-32-99-102.electricbrick.co/blog/faculty/
http://su2.edu.70-32-99-102.electricbrick.co/blog/department/biology/
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.