In Facebook's Genesis group, a user wrote:
I need to split up the Staff into three different types - Staff, Facilitators and Interns. I've created three custom taxonomies for them, and figured out how to display one of them, but I am not sure how to display them all on one page, but separated into "sections." The styling for each section remains identical.
The styling is fairly simple - just a featured image floating to the left, a name, title, and excerpt. The staff name is linked to the individual page. Each section needs to have a header above it.
In this tutorial we are going to use Pods to create Staff Custom Post Type, a corresponding Staff Type custom taxonomy, a Staff Title custom field and set up the CPT archive template to display the Staff members grouped by Staff Type with team member's photo (featured image) on the left; Name (entry title), Staff Title and Excerpt on the right.
Step 1
Install and activate Pods.
Step 2
a) Create Staff CPT. Add a field with the name of staff-title. Tick 'Enable Archive Page'.
b) Create Staff Type taxonomy. Make it Hierarchical.
c) Edit the Staff CPT and attach it to Staff Type taxonomy.
Step 3
Add the following in child theme's functions.php:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
Thanks so much Sridhar; this worked like a charm.
I wonder how I would re-order the staff type display? It seems to be in alpha order, I think, or maybe by item count. I tried adding an “orderby” argument to the array, but nothing happened. I even installed a plugin that supposedly allows re-ordering of custom taxonomies, but that didn’t work either.
I can’t seem to change the menu order either on the “Staff titles” menu.
Any ideas?
-Allison
What do you want to order staff type by and in what order?
I’m not sure what to order them by, since I can’t seem to change the order in the menu. I don’t think I can change the ID, can I?
I can change the slug, so maybe I can order by slug and then make the slugs alpha. (I tried that, but it didn’t work at this point)
1) Staff 2) Facilitators 3) Interns
the current url is here:
http://www.stirfryseminars.com/2015Update/staff/
Can be done using a plugin like https://wordpress.org/plugins/custom-taxonomy-order-ne/.
http://d.pr/i/15pBc at wp-admin/admin.php?page=customtaxorder-stafftype will result in your desired order of appearance: Staff, Facilitators, Interns.
Yes, I tried this using the plugin Custom Taxonomy Order – it re-ordered them in the dashboard, but did not affect the display on the site.
I’ve worked around the issue by changing the names of the staff types so they are in alphabetical order, and so they display in that order now.
Thanks.
Strange. It worked fine for me even on the front-end in my test site.
Is it possible to augment this code to work as a selectable, static page template, as opposed to an archive? I’ve attempted to modify it myself using some of your other tutorials — to no avail — to pull in my custom posts for a location taxonomy, but I can’t seem to figure out the query to force the template to look for the custom post type properly.