flo
flo

Reputation: 671

How to create a custom reuseable HTML template populated with data from database?

I have a database containing many records - let's say its a people database and the columns contain Name, Surname, Age, FreeText.

I want that this data to be displayed in a list on my website. Each item in the list should contain the database' row data.

In detail, each list item should be a custom HTML div consisting e.g. of 2 columns, where in the first column the Surname and the Name should be displayed in the first row, the age in the second. In the second column there should be the free text.

There should also be a onClick listener on this item.

I am a Wordpress Beginner, I have no idea how to achieve this. I think the general approach has to be: Get records from DB, create the items dynamically, put the into the list, and display the list on the page.

I purchased the Avada theme for the design, but this kind of functionality does not seem to be included.

Any hints where to start? Do I have to create dynamic php files, and if yes, how? With javascript? Or are there Plugins available which I can use?

Upvotes: 0

Views: 552

Answers (1)

mortezashojaei
mortezashojaei

Reputation: 452

i find this plugin for you try this link: https://wordpress.org/plugins/participants-database/

This plugin offers all the functionality needed to build and maintain a database of people or anything you want. The database is fully configurable, allowing you to define all the fields of information you want to store for each record. The records can be entered individually in the WordPress admin section, imported with a CSV file, or let the individuals themselves create their own record. Display lists of records can be sorted and filtered by any field, and the result exported as a CSV file.

Upvotes: 1

Related Questions