Skip to content
Custom fields for WordPress that are quick to build and quick to load. Get Pro
Docs

Git and deploys

Write the JSON files in another folder

By default the files are written in ugly-json/ of your theme. Two filters change it: ugly_json_paths (where files are read from) and ugly_json_save_path (where they are written).

1 minute to read Updated 1 week ago

You want: the JSON files of your groups in another folder of the theme, not in ugly-json/.

PHP
add_filter( 'ugly_json_save_path', function () {
	return get_stylesheet_directory() . '/config/fields';
} );

See Hooks and filters for every filter of this kind.

Did this article answer your question?