Home › Forums › General Issues › ACF-JSON Custom Folder Location Not Working › Reply To: ACF-JSON Custom Folder Location Not Working
Hey @blakemiller,
You’re mixing up filters here. save_paths doesn’t support a type argument, as it’s for filtering the whole array, although we do pass you in the post as an argument so you can detect if it you like:
apply_filters( 'acf/json/save_paths', $paths, $post );
Alternatively, you can use the save_path (no s) setting with a type argument, so something like:
add_filter( 'acf/settings/save_json/type=acf-post-type', 'set_custom_json_save_path_for_post_types' );
function set_custom_json_save_path_for_post_types() {
return get_stylesheet_directory() . '/acf-json/post-types';
}
We have to keep both around for backwards compatibility, so sorry it’s a bit confusing!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.