Field Render

Display a modern Link Selector in a modal which allow customization. Posts, Post Types Archives & terms selection can be filtered in the field administration.

Field Settings

Setting nameDescription
Filter by Post TypeFilter which Post Types are allowed
Filter by TaxonomyFilter which Taxonomies are allowed

Field Value

Values can then be retrieved using the common get_field() function. The returned data are grouped into an array. Usage example:

$advanced_link = get_field('advanced_link');

/*
 * Array(
 *      [type] => url
 *      [url] => https://www.acf-extended.com
 *      [title] => ACF Extended
 *      [target] => 0
 *      [my_field] => 1
 * )
 */

Add Sub Fields

You can add your own sub fields using acfe/fields/advanced_link/sub_fields hook. All ACF fields are compatible, as long as they are correctly registered. Note that id and key sub fields keys are unecessary and will be automatically genereated. Usage example:

/**
 * @array $sub_fields   Sub fields array
 * @array $field        Advanced Link field
 * @array $value        Advanced Link values
 */

add_filter('acfe/fields/advanced_link/sub_fields/name=advanced_link', 'my_acf_advanced_link_sub_fields', 10, 3);
function my_acf_advanced_link_sub_fields($sub_fields, $field, $value){
    
    $sub_fields[] = array(
        'name'      => 'my_field',
        'label'     => 'My field',
        'type'      => 'true_false',
        'ui'        => true
    );
    
    return $sub_fields;
    
}