The purpose of creating custom tables is often to store information to be shared with website visitors. As such, it is important to give users the ability to easily display their new content stored in custom tables on their website. The most straightforward method to achieve this goal is to create one or more shortcodes that can be inserted on any post or page to render the desired information.
This recipe shows how to implement a new shortcode that will be used to display a bug listing on a page.
You should have already followed the Deleting records from custom tables recipe to have an existing framework to augment. Alternatively, you can get the resulting code (
Chapter 8/ch8-bug-tracker/ch8-bug-tracker-v5.php) from the code bundle and rename the file