Support

Account

Home Forums ACF PRO acf-json not updating Reply To: acf-json not updating

  • Hi, i’ve found something, but i don’t know if is your case.

    I’m using acf-pro on a mulsite enviroment and i’ve found and issue when using child themes.

    Scenario: i want to create and modify my custom fields on my parent theme, localhost, and show on wp-admin for users but don’t let they change the fields on server, so i decided to use acf-json.

    When i’m using the same theme, it works fine, but when i’m using child themes, the fields do not update.

    Testing my site i’ve found that when i’m using child themes, the fields are saved to “current” theme, even if the current theme is a child theme.

    Change the default save and load options, from “get_stylesheet_directory()/acf-json” to “get_TEMPLATE_directory()/acf-json”.

    The function get_template_directory() returns the main directory for the theme if is parent and the parent_directory if is a child theme, so now it works fine and i can control my fields only in the parent theme.
    Hope it can help you! 😉