Julian Rouw Julian Rouw - 9 days ago 7
MySQL Question

Wordpress list table mysql data

--------------EDIT--------------

The table works and he shows data, but the add_menu plugin function is written in the wp list table class. And I do not want. I myself have written a add_menu plugin function and I just want to include this table in a file that I created. The add_function take away makes no sense because the table is no longer visible. someone has a solution?




I’m busy to write my own plugin for WordPress (It’s for my own). I have now that the data from an MySQL table shows on the plugin page. I used a Bootstrap table.

Now I want to show the data in an WordPress table. An WP List Table. In the WordPress docs I cannot find an solution to use the WordPress table with data from another MYSQL table.

I have used this tutorial: https://www.sitepoint.com/using-wp_list_table-to-create-wordpress-admin-tables/ but the table don’t show.

Can anybody help me?

Answer

create shotcode for gethering data

//[myshortcode]
function mydata_func(  ){
   //my custom code for get custom table data
}
add_shortcode( 'myshortcode', 'mydata_func' );

[myshortcode] use this shortcode anywhere for display data