I am working on a plugin that creates an inventory list page using an XML data file. For the sake of this example, let us say the inventory items are antique motorcycles or contemporary area rugs.
User activates my plugin and adds a short code to a page in order to display the inventory on a page called "Inventory."
I want to introduce a details page so when the end user wants to enlarge the thumbnail picture or read more details about a specific motorcycle, he can click from site.com/Inventory to site.com/Inventory/somethingelse/ to find that information on another page.
What is the right way to code this? Some things I have considered are...
- Create another page and another short code and then hide the page from the menus
- Add rewrite rules to send these requests to a .php file in my plugin directory
What do you think?
Thanks for reading.