Create dedicated page with custom template showing custom data

My first response when I hear “custom tables” is – are you absolutely certain you need custom tables rather than using custom post types, post meta data, and custom taxonomies? Far fewer wheels to reinvent by going that route.

That said, to integrate data into any theme, a couple of options are to either create a Shortcode to inject your data into the content area, or add a filter to the_content, where you can check if it’s your courses page, and inject your data into the content area.

Rather than add a page automatically, I would give users the option to select a page they want to use for display. If you do indeed want to add a page, you can use wp_insert_post to generate one.