How to correctly add a table to the WordPress MySQL database

Firstly I would try to avoid the use of a custom table using custom post types, custom taxonomies and post/user/term meta. This will greatly increase compatibility and give you a large chunk of free functionality, such as UIs, import/export support, archives, REST APIs, etc But assuming you cannot use that, for whatever reason, you should: … Read more

Store and Encrypt Contact Form 7 Submissions in Database? [closed]

As @kero said, use a CF7 hook. I’d use the wpcf7_before_send_mail hook. Grab data from the CF7 form object’s fields, and use those values to store data. I wrote a post to myself on how to get data from the CF7 form object here: http://securitydawg.com/changing-contact-form-7-with-the-wpcf7_before_send_mail-hook/ . You could use that to get started, just insert … Read more

I want to run different WordPress websites under the same database

I believe a multisite solution + WooCommerce plugin (which is multisite compatible) would answer to the specifications you have listed. About the multisite installation I strongly recommend you to read: https://codex.wordpress.org/Before_You_Create_A_Network https://premium.wpmudev.org/blog/how-to-build-a-wordpress-multisite-network-with-multiple-domains/ As explained in the tutorial above, you can set different domain names for each of your sites, it just requires an additionnal plugin … Read more

How to add Edit | Delete button on rows?

Based on your code, you don’t have a column called ‘name’. Method column_name will display column content for the column ‘name’. So, for instance, you have the column called ‘madonhang’. Method for that column will be called ‘column_madonhang’. Each column has own method with the similar name.