Advanced custom files select

I’m working on a clients site that posts articles, these articles have a source option created in ACF. The client will want to eventually add other sources to choose from. Instead of having the client go into the advanced custom fields area and add a source to the choices, is there an option to create a list or something similar to a Drupal view? So, my client can just easily go onto say a sources page, add a source and it automatically be added to ACF list?

Any help is greatly appreciated.

Related posts

1 comment

  1. Justin, this is possible. There are a couple of ways to approach it – you could create a new Custom Post Type called “Source” and set it as an ACF relationship type field but that may be a bit excessive here.

    Another useful approach would be to add a “source” taxonomy for your posts. Add something like this to your functions.php file:

    add_action( 'init', 'create_source_tax' );
    
    function create_source_tax() {
        register_taxonomy(
            'source',
            'post',
            array(
                'label' => __( 'Source' ),
                'rewrite' => array( 'slug' => 'source' ),
                'hierarchical' => true,
            )
        );
    }
    

    Then you will have the option to easily manage new sources, much like WordPress categories. There is much more information on that here: https://codex.wordpress.org/Function_Reference/register_taxonomy

Comments are closed.