Title: Problem getting started
Last modified: August 22, 2016

---

# Problem getting started

 *  Resolved [jane-taubman](https://wordpress.org/support/users/jane-taubman/)
 * (@jane-taubman)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/problem-getting-started/)
 *     ```
       add_action( 'admin_init', 'rjt_load_tables' );
   
       function rjt_load_tables() {
       if(function_exists('add_db_table_editor')){
        add_db_table_editor('title=Products&table=wp_rjt_product');
   
       add_db_table_editor(array( 'title'=>'Prices', 'table'=>'wp_rjt_prices'));
        }
       }
       ```
   
 * I am using the above in a plug to try and add two tables to the Dashboard on 
   my site. Both tables exist, and if I put a “hello world” in the middle it appears
   on the admin screen.
 * Trying to add this with out using the hook fails as my plugin gets started before
   the add_db_table_editor function is available.
 * Sorry if I am doing something stupid.
 * [https://wordpress.org/plugins/wp-db-table-editor/](https://wordpress.org/plugins/wp-db-table-editor/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [bobbysmith007](https://wordpress.org/support/users/bobbysmith007/)
 * (@bobbysmith007)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/problem-getting-started/#post-5554231)
 * That all seems quite reasonable… I am not sure what this issue is, but I will
   look into it. Perhaps there is some event ordering aspect that I am not currently
   aware of / thinking about.
 *  Plugin Author [bobbysmith007](https://wordpress.org/support/users/bobbysmith007/)
 * (@bobbysmith007)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/problem-getting-started/#post-5554236)
 * Ok, the problem is that admin_init is unintuitively called after admin_menu. 
   Since `admin_menu` is the event used by `wp-db-table-editor`, you will need to
   hook that with a lower priority than the plugin.
 * `add_action( 'admin_menu', 'rjt_load_tables', -10 );`
    solves the problem for
   me. Please feel free to reopen if it doesnt resolve this issue for you. I will
   also update the readme.
 * Thanks!
 *  Thread Starter [jane-taubman](https://wordpress.org/support/users/jane-taubman/)
 * (@jane-taubman)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/problem-getting-started/#post-5554238)
 * Thanks very much, that fixed it. Sorry to have troubled you.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Problem getting started’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-db-table-editor.svg)
 * [WP-DB-Table-Editor](https://wordpress.org/plugins/wp-db-table-editor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-db-table-editor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-db-table-editor/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-db-table-editor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-db-table-editor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-db-table-editor/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [jane-taubman](https://wordpress.org/support/users/jane-taubman/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/problem-getting-started/#post-5554238)
 * Status: resolved