Dynamic Templates

The Dynamic Templates module let you manage default ACF values in an advanced way. In order to start, you need to connect a field group to a specific template. Head over the Field Groups administration, select the field group of your choice and scroll down to the location settings. To connect a field group to a template, choose a classic location and click on the “Add” button. Select the rule “Dynamic Template” under “Forms” group, then choose your template and save the field group.

You can now fill up the template page, values will be automatically loaded for the location it is tied to. In this screenshot, there is a different template for the “Post Type: Page” & the “Post Type: Post” while using the same field group.

The Dynamic Template system is smart enough to fulfill complex scenarios. For example, one single template can be used in conjunction with as many field group locations as needed. It is also possible to add multiple field groups into a single template to keep things organized.

Note: Template values will be loaded when the user haven’t saved any values on the related location. Typically in “New Post” or “New Term” screens. If the user save a value, even an empty one, the template won’t be loaded.