I know thw answer must be very simple, but I have been looking for weeks and I haven’t found straight forward answers.
I have built a plugin in wordpress that at a certain page, via a shortcode embedded, will display a list of names.
These names are coming from the database on an extra table, not wp.
I would then like the user to click on each one of these names and be directed to a dynamic page that has details about this person (the name just clicked).
The details would have to be populated via the plugin again by means of a few queries to those extra tables that are not wp.
I would just like to know how I create such page and make it generic so that I can use it over and over for all the list of people that I have.
I’ve tried making a new taxonomy and creating a custom template… but its getting very confusing and I’m sure this should be much simpler.
Can someone please help?
You can keep everything on the same page with GET variables. Iterate over an array of persons and link the results to the current page, appending a query arg to each link:
You can then check if the variable is set, do some validation, and display the single person data: