Support

Account

Home Forums General Issues How to Modify Custom Field Settings Per Page? Reply To: How to Modify Custom Field Settings Per Page?

  • You can’t alter the “Show on Page” or the location of the field group this way.

    You would need to:

    1) Create a different field group for each template

    2) If you’re using ACF5 Pro you could create a different field group for each template and use the new clone field to duplicate the fields

    3) Again, in ACF 5, there is a hook acf/get_field_group and you can add a filter to filter the field group when it is loaded.

    
    add_filter('acf/get_field_group', 'my_get_field_group_filter');
    function my_field_group_filter($field_group) {
      // modify group settings
      return $field_group;
    }
    

    Inside the filter you might be able to detect what page is being loaded and alter the group settings based on the page template. I am not 100% sure of this last option or the details on what you’d need to do here, it’s just a guess on my part. This filter may run before you can figure out what you need.