Selecting documents from a library on a wordpress server



I want to allow a web user to select documents based on categories and be able to access them via their URLs.

I have two tables. Firstly, I have a Documents table which contains the name of the document, the URL, a long description and one or more categories. The categories are linked to a Categories table. The primary key is an auto generated sequential number.

The second table contains the list of categories. Categories is the primary key. There is also a field which is the link to the Documents table and contains links to the documents that contain this category. In airtable, if I click on this field, I get a list of all the documents related to this category. This is what I want.

My question is to know how to enable this selection of all documents of a chosen category on a web page. I assume I need some sort of view, but I can’t see how to implement a view that gets multiple records (read-only) from linked tables. Also, I’d like to have some control over how the data is presented.

Advice would be most appreciated.