I use Advanced Custom Fields 5 Pro for most custom WordPress projects, and the latest version supports saving your Field Groups to JSON.
我将Advanced Custom Fields 5 Pro用于大多数自定义WordPress项目,并且最新版本支持将您的字段组保存为JSON。
To activate this functionality out of the box, all you have to do is create a folder within your theme called /acf-json/
.
要立即启用此功能,您要做的就是在主题 em>中创建一个名为 / acf-json / code>的文件夹。But I don’t like that.
但我不喜欢。 p>
I prefer for these JSON files to be stored outside of the theme, because they’re key to the functionality of the website, and functionality === plugin
.
我更喜欢将这些JSON文件存储在主题之外,因为它们是网站功能和 functionality ===插件 code>的关键。Storing this data outside of your WordPress theme makes it inherently more portable, and means you can retain the ACF JSON data even if you change theme.
将这些数据存储在WordPress主题之外,使其本质上更具可移植性,这意味着即使更改主题,您也可以保留ACF JSON数据。 p>
Once the plugin is installed and activate it will automatically save field groups as JSON within the plugin’s /acf-json/
folder when they are updated or saved.
安装并激活插件后,更新或保存插件后,它们会自动将字段组另存为JSON在插件的 / acf-json / code>文件夹中。 p>This plugin is under active development on Github
此插件正在 Github p>上进行积极开发。
Requirements
要求 h4>
- ACF 5 Pro (Synchronized JSON requires at least v5.1.5)
- ACF 5 Pro(同步的JSON至少需要v5.1.5) li>
ul>