Dynamic Taxonomies

The Dynamic Taxonomies module allows you to register and manage custom taxonomies from your WordPress admin, in Tools > Taxonomies menu.

All native taxonomies settings can be set within the UI. ACF Extended also adds more advanced settings allowing to manage posts per page, order etc…

Advanced Settings

The module comes with additional settings that allows an advanced control over taxonomies.

SettingDescription
Front: Single Posts per pageSet posts per page
Front: Single Order/OrderbySet order/orderby setting
Front: Single TemplateSet custom template. Example: my-taxonomy-single.php
Admin: List Posts Per PageSet posts per page
Admin: List Order/Order bySet order/orderby setting

Export/Import Taxonomies

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.

Register Taxonomies in PHP

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' => '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'
        
    ));
    
}

Existing Taxonomies

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')
        return $args;
    
    // Set Front: Archive Posts Per Page
    $args['acfe_single_ppp'] = 999;
    
    // Return
    return $args;
    
}

Disable the module

This module is enabled by default. To disable it, you can use the following code:

add_action('acf/init', 'my_acfe_modules');
function my_acfe_modules(){

    // Disable Dynamic Taxonomies
    acfe_update_setting('modules/dynamic_taxonomies', false);
    
    // Or:
    acf_update_setting('acfe/modules/dynamic_taxonomies', false);
    
}