How to populate custom tables with rows of data

Looking at this article on WP.org it seems you have to create your database first, with some SQL: function mp_install_table() { global $wpdb; $table_name = $wpdb->prefix . “countries”; $sql = “CREATE TABLE $table_name ( id mediumint(9) NOT NULL AUTO_INCREMENT, name tinytext NOT NULL, labour_cost INT, overheads FLOAT, profits FLOAT );”; require_once( ABSPATH . ‘wp-admin/includes/upgrade.php’ ); … Read more

Creating a Restaurant Menu

I’m not sure if suggesting plugins here is still taboo, but I’m going to go that route for you, because it’s going to be the most effective and simple method for you to achieve this. Install two plugins: Custom Post Type UI, and Advanced Custom Fields Alternatively, forego CPTUI (it’s just nice to have a … Read more

How can I add a row in a table from a Linux Shell?

I’d assume you can use WP-CLI for that. Especially wp db import should be usable for that. Last but not least the MySQL Command-Line Tool itself, which I’d think is used by WP-CLI for the tasks, can be used. A word of warning though, there might be some logic to consider regarding the rows you … Read more

Table editing in WordPress

You can do this by adding a custom CSS. Go to “Appearance > Customize > Additionnal CSS” and add this : td,tr { border: none!important; } it will get rid of all table border

Looking for a simple tool to update a table

WordPress has an API available to allow external scripts to get data from your website and to add (POST) data to your website. You can create a custom API endpoint where you receive the data from the other server and in a simple function create a new record in the WordPress database: Create a function … Read more

putting wp_query data into html table

Here is what is happening with your code: query_posts uses the global variable wp_query. It always overwrites that variable, which is why you should not use query_posts pretty much ever. Your first query_posts clobbers the original $wp_query data. You start the Loop The first thing you do in that loop is reset $wp_query to the … Read more

WP_List_Table error on WordPress 4.4

Heyaa…, I’ve found a final answer, hufft… Yeah, first I include the necessary classes just like in this thread : Fatal error after 4.4 upgrade class-wp-list-table And second, I added up this line in the display_tablenav method in WP_List_Table class : $this->screen = get_current_screen(); before this line : $this->pagination( $which ); That added line create … Read more