Answers for "wp insert"

0

insert query in wordpress

$wpdb->insert('wp_submitted_form', array(
    'name' => 'Kumkum',
    'email' => '[email protected]',
    'phone' => '3456734567', // ... and so on
));
Posted by: Guest on April-26-2021
1

insert into wp table

global $wpdb;
$table = $wpdb->prefix.'you_table_name';
$data = array('column1' => 'data one', 'column2' => 123);
$format = array('%s','%d');
$wpdb->insert($table,$data,$format);
$my_id = $wpdb->insert_id;
Posted by: Guest on December-09-2020

Browse Popular Code Answers by Language