Let’s imagine here that we’ve built a custom table inside your Worpress database, and that ou don’t want to use widgets nore plugins to access it.

Well, you can use a template to do it !

Get the WP connection

This is a sample snippet to use inside your template :

global $wpdb; // Very very important !
$results = $wpdb->get_results("select * from your custom_table");
// and now output your result
foreach($results as $item)
  echo $item->any_field;

What is important here it the $wpdb global variable. It is an object created by the WordPress framework which gives you access to the database connection and a series of methods to work on tables.

I leave the details up to you.