function custom_items_table_shortcode() { global $wpdb; $table_name = $wpdb->prefix . 'custom_items'; $items = $wpdb->get_results("SELECT * FROM $table_name"); ob_start(); ?>
ID | Item Name | Description | Approved |
---|---|---|---|
id; ?> | item_name; ?> | item_description; ?> | is_approved ? 'Yes' : 'No'; ?> |