It is possible to export and import Taxonomies in a Json file using the ACF > Tools menu. Taxonomies can also be exported in PHP format, to manually register them in the functions.php
file. Those tools are also available directly within the Dynamic Taxonomies UI.
The module comes with additional settings that allows an advanced control over taxonomies.
Setting | Description |
Front: Single Posts per page | Set posts per page |
Front: Single Order/Orderby | Set order/orderby setting |
Front: Single Template | Set custom template. Example: my-taxonomy-single.php |
Admin: List Posts Per Page | Set posts per page |
Admin: List Order/Order by | Set order/orderby setting |
Taxonomies can be registered using register_taxonomy()
and benefit from ACF Extended advanced settings like “Front: Single Posts Per Page” or “Admin: List Order/Order by”. See documentation. Usage example:
add_action('init', 'my_init');
function my_init(){
register_taxonomy('my-taxonomy', array('my-post-type'), array(
// label
'label' => 'My Taxonomy',
// front
'acfe_single_template' => 'my-taxonomy-single.php',
'acfe_single_ppp' => 999,
'acfe_single_orderby' => 'title',
'acfe_single_order' => 'ASC',
// admin
'acfe_admin_ppp' => 999,
'acfe_admin_orderby' => 'title',
'acfe_admin_order' => 'ASC'
));
}
Advanced settings can be used in already existing taxonomies using the register_taxonomy_args
hook. See documentation. Usage example:
add_filter('register_taxonomy_args', 'my_taxonomy_args', 10, 3);
function my_taxonomy_args($args, $taxonomy, $post_types){
// target "my-taxonomy"
if($taxonomy === 'my-taxonomy'){
// set front: archive posts per page
$args['acfe_single_ppp'] = 999;
}
// return
return $args;
}