最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - How to store ACF custom fields data in a custom table

programmeradmin0浏览0评论

I am using the ACF Custom Fields plugin to store some info, but to my understanding, it is stored in the wp_postmeta table. Is it possible to store it in a custom table instead? So for example, the data would be: fullName, age, gender. and I would like to create a table called personalInformation and have these 3 columns.

I am using the ACF Custom Fields plugin to store some info, but to my understanding, it is stored in the wp_postmeta table. Is it possible to store it in a custom table instead? So for example, the data would be: fullName, age, gender. and I would like to create a table called personalInformation and have these 3 columns.

Share Improve this question asked Nov 11, 2019 at 2:39 lenhelenhe 631 silver badge3 bronze badges 1
  • the most efficient way in WordPress to manage a new kind of object is to create a custom post type developer.wordpress/plugins/post-types/… – Kaperto Commented Nov 11, 2019 at 9:17
Add a comment  | 

3 Answers 3

Reset to default 6

It is possible to save ACF data in custom tables by using a separate paid plugin called ACF Custom Database Tables.

However, if your goal is just to keep the database as light as possible, meevly's solution of creating your own custom metaboxes would be the lightest-weight option, versus adding two plugins just to track a few bits of data.

There is a free plugin now https://wordpress/plugins/acf-fields-in-custom-table/.

It was heavily inspired by Austin Ginder's post https://anchor.host/acf-custom-fields-stored-in-custom-table/

Unfortunately, you can't do that. In order to store your data in a separate database table, you should manually add custom meta boxes and save the data wherever you want. You can read more about it here: https://developer.wordpress/plugins/metadata/custom-meta-boxes/

发布评论

评论列表(0)

  1. 暂无评论