Home › Forums › Front-end Issues › How to build a staff members directory ?
I’m building a website for a NGO about scientist and research. My goal on this project is to build a staff members directory based on search criterias.
I’m quite new to wordpress. My biggest joy is setting up every criterias with « Advanced Custom Fields » plugin (ACF Version 4.4.8) . To me this is a major plugin.
I use pages (not posts) to build the directory.
My problem is I know a very little PHP programming and this side of WP. Can anyone help me to accelerate my learning curve ?
NB my site runs today on mamp localy.
Here’s my goal :
Each staff member is qualified by two « themes » (this a kind of criteria). One principal (always required) and one optional.
Those two « themes » are chosen by the user via a « select » field type containing the different themes (5 themes).
Each staff member is also qualified by « keywords » (20+). Those are selected by the user via a « checkbox » field type.
Each staff member has a custom page template (staff-member.php + content-staff.php) where I inject all the informations and criteria. This is OK.
The problem :
How to set up a page an intro displayed with
<?php the_content(); ?>
and an unordered list of « themes » plus a paragraph containing each « keyword » ordered alphabeticaly. Each « theme » and « keyword » are links (encapsuled in
<a href=« « ></a>) and are leading to a list of staff members sorted by « sorting key » (text field type) which is Firstname+Lastname.
Here’s 2 wireframe explaining this.
I’ve read the forum but I didn’t find the answer.
For something like this, I suggest you use a custom post type instead. You can easily create custom post type by using a plugin like Custom Post Type UI. For the themes and keywords, I suggest you use custom taxonomies.
With this setup, the themes and keywords will create relationship just like categories and tags for a post. Thus you will have archive pages that list the staff members.
To set the theme and keywords, you can use the custom taxonomy meta box just like a normal post.
For further information regarding custom post type, kindly visit WordPress community instead.
I hope this helps 🙂
Waow ! Thank you.
This is a more appropriate way of doing it. And it’s a more obvious way to complete my learning curve. Thank for the plugin idea. Otherwise I was looking to Generate WP website.
I discovered the Post Type Generator and the Taxonomy Generator.
So problem solved.
THX AGAIN !
I keep ACF to inject other related infos to every staff member.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We’re hard at work on ACF 6.1, and Beta 1 is now available 🚀— Advanced Custom Fields (@wp_acf) March 16, 2023
This release includes custom post type and taxonomy registration, an improved experience when selecting field types, PHP 8.1 and 8.2 compatibility, and more!
Let’s take a look 🧵https://t.co/Y0WcAT11l4
© 2023 Advanced Custom Fields.