This WordPress plugin makes it possible to save the ACF flexible content fields as templates and to use them again.
Advanced Custom Fields Pro 5.7 or greater has to be installed and activated.
'mc_acf_ft_true_false'=> 1
in the options of this last one (after min, max and button_label options)mc_ft_import_cap
and mc_ft_save_cap
which you must pass one or more WordPress capabilities.mc_ft_template_plural
, mc_ft_template_singular
and mc_ft_template_all_menu_label
.
Examples of how to use them :
// singular label
function my_custom_template_sing_label( $singular_name ) {
$singular_name = __( 'Custom singular', 'my-text-domain' );
return $singular_name;
}
add_filter( 'mc_ft_template_singular', 'my_custom_template_sing_label', 10, 1 );
// plural label function my_custom_template_plur_label( $plural_name ) { $plural_name = __( 'Custom plural','my-text-domain' ); return $plural_name; } add_filter( 'mc_ft_template_plural', 'my_custom_template_plur_label', 10, 1 );
// the "all" menu label function my_custom_template_menu_label( $all_menu_label ) { $all_menu_label = __( 'Custom "all" menu label', 'my-text-domain' ); return $all_menu_label; } add_filter( 'mc_ft_template_all_menu_label', 'my_custom_template_menu_label', 10, 1 );
## Screenshots
* Flexible field setting
![Field setting](https://github.com/MarieComet/MC-ACF-Flexible-Template/blob/master/screenshots/screenshot-1.png "Field setting")
* Save flexible layouts as template
![Save template](https://github.com/MarieComet/MC-ACF-Flexible-Template/blob/master/screenshots/screenshot-2.png "Save template")
* Import flexible template
![Import template](https://github.com/MarieComet/MC-ACF-Flexible-Template/blob/master/screenshots/screenshot-3-1.png "Import template")
* Flexible template imported
![Template imported](https://github.com/MarieComet/MC-ACF-Flexible-Template/blob/master/screenshots/screenshot-3-2.png "Template imported")
* Flexibles templates list
![Flexibles templates list](https://github.com/MarieComet/MC-ACF-Flexible-Template/blob/master/screenshots/screenshot-4.png "Flexibles templates list")
* Edit existing template
![Edit existing template](https://github.com/MarieComet/MC-ACF-Flexible-Template/blob/master/screenshots/screenshot-5.png "Edit existing template")
### History
### 2017-12-23 1.0.1
* Initial Commit
### 2018-01-04 1.0.2
* Add edit templates functionnality
* Add filters to edit admin labels
### 2018-07-14 1.1.0
* Update for ACF 5.7.0 JS API changes
* Important : require at LEAST ACF 5.7.0
### 2018-11-01
* Add new feature "replace existing content" before import. Thanks @virgo79 !
### March 13 2020
* Tested with WordPress 5.3.2 and ACF Pro 5.8.7.
### October 21 2021 1.1.1
* Allow html tags in acf field label (https://github.com/MarieComet/mc-acf-flexible-template/issues/23)