I mentioned that I could talk with anyone interested in setting up “filterable” document libraries. This is far from exhaustive, but I thought I would quickly write out the advice that I shared yesterday.
Caveat: This is about building a library natively in WordPress, not integrating an external database.
I rely mostly on three plugins to get me started:
- Advanced Custom Fields (for creating the metadata associated with each document)
- FacetWP (for creating the “filtering” interface known as “faceted navigation”)
- SearchWP (for a much better search that includes metadata. It’s like Relevanssi but built to integrate with FacetWP)
My process goes something like this:
- Create a “content map” (or “content model”) document with the client to specify each field that makes up a resource.
- Build a “Resource” (or document or item) Custom Post Type. (Make sure to use a sweet Dashicon for the menu icon.)
- Add custom taxonomies as needed. If you want to use FacetWP, it’s likely you’re allowing people to filter by taxonomy. *
- Use ACF to add custom fields to the new post type.
- Have the client try entering a few resources (ideally a wide variety) to see how it goes.
- Adjust custom fields.
- Build templates to show individual Resources and Resource Library page with facets.*
* It’s easy to go a little overboard with taxonomies and terms. Aim for highly-constricted taxonomies with a clear scope of potential terms that will likely change little after launch.
** That’s a big step with more tech than I’m going into right now. It requires a good knowledge of theming.
Here’s an example of what I built. Two more are in the works right now. I’m happy to answer questions below and please add any other ideas or plugins you like to use for similar projects!