Create Custom Table

ACF to custom database tables plugin creates a custom database table using the ACF field group and columns using field group's fields. So let's say you want to create a custom table for saving product data which should have a name, price, details, and image columns. Create a new field group in ACF and add fields for name, price, details, and image.

how to create custom table intro

Steps:

  1. Create ACF field group or edit already created ACF field group
  2. Scroll Down to bottom and toggle on "Custom Table" option from "ACF to Custom Database Tables Settings" toggle custom table button
  3. Enter table name in "Custom Table Name" input field and press "update" button acf custom table name
  4. After pressing the update button, notice will be shown on top of the screen. Now click on the "Go to Manage Tables" button to create a custom table. acf manage custom table
  5. Now on manage tables screen click on the "Create Table" button to create a custom table. manage table
  6. Done acf custom table created

SQL column data type is decided based on the ACF field type. For example, for the number field, an int data type is used

Upgrade to PRO