Skip to content

Supports JCF

Alex Prokopenko edited this page Aug 23, 2018 · 4 revisions

Just Custom Fields is a plugin to create custom fields for Pages, Posts, Custom Post Types and Taxonomy terms.

This plugin has an option to store fields configuration inside a theme folder (or wp-content folder) in JSON format. This feature helps to keep your fields configuration under version control and share it easily between your environments with GIT.

To enable this feature open Just Custom Fields Settings page, and update Settings storage option to store data in a current theme.

By default JCF saves JSON file inside {stylesheet dir}/jcf/config.json.
To better organize different config files we created a small extension, which moves this config file to a theme config folder.
New file location is {stylesheet dir}/config/just-custom-fields.json.

To enable this feature you need to create an instance of a support class inside your Theme::support_plugins() method:

public function support_plugins() {
    \JustCoded\WP\Framework\Supports\Just_Custom_Fields::instance();
    ...