CPT UI and custom database table

No, a custom post type is still a post in the posts table, you can’t connect it because it’s not a connection. It’s a column in a table.

If you want to have the same UI as posts but for a custom table, you’re going to have to implement it yourself:

  • with a custom settings page
  • custom SQL code
  • A custom implementation of WP_List_Table, create a class that inherits from WP_List_Table and implement the methods so that it loads your database rows
  • Another custom settings page that will act as the new/add/edit screen, implemented from scratch

Suffice to say this task is too broad to answer in a single question/answer, and you’re facing a lot of manual recreation, including building pagination from scratch, etc

It would be easier to use a real custom post type, or to build a bespoke UI. My recommendation would be a JS powered UI using REST endpoints