acf/schema/schema_properties

Last updated Mar 31, 2026

Overview

Filter available Schema.org properties for a field type.

Description

This filter allows you to modify the list of Schema.org properties available in the field settings dropdown. Properties are filtered by field type compatibility and organized by Schema.org type.

Changelog

  • Added in version 6.8.0

Parameters

apply_filters( 'acf/schema/schema_properties', $properties, $field_type );
  • $properties (array) Hierarchical array of properties grouped by Schema.org type
  • $field_type (string) The ACF field type (e.g., text, number, image)

Return

(array) The modified properties array.

Example

This example adds custom properties for text fields.

/**
 * Add custom Schema.org properties.
 *
 * @param array  $properties Grouped array of properties.
 * @param string $field_type The ACF field type.
 * @return array Modified properties.
 */
function my_acf_schema_add_properties( $properties, $field_type ) {
    if ( $field_type === 'text' ) {
        // Add custom properties for text fields
        $properties['Custom'] = array(
            'customProperty'  => 'customProperty',
            'internalCode'    => 'internalCode',
        );
    }

    return $properties;
}
add_filter( 'acf/schema/schema_properties', 'my_acf_schema_add_properties', 10, 2 );

This example removes properties that shouldn’t be used.

/**
 * Remove deprecated Schema.org properties.
 *
 * @param array  $properties Grouped array of properties.
 * @param string $field_type The ACF field type.
 * @return array Modified properties.
 */
function my_acf_schema_remove_deprecated( $properties, $field_type ) {
    // Remove deprecated properties from all types
    foreach ( $properties as $type => &$props ) {
        if ( is_array( $props ) ) {
            unset( $props['deprecatedProperty'] );
        }
    }

    return $properties;
}
add_filter( 'acf/schema/schema_properties', 'my_acf_schema_remove_deprecated', 10, 2 );
Supercharge Your Website With Premium Features Using ACF PRO

Speed up your workflow and unlock features to better develop websites using ACF Blocks and Options Pages, with the Flexible Content, Repeater, Clone, Gallery Fields & More.

Explore Features View Pricing

PRO Features
ACF Blocks
Options Pages
PRO Fields
Repeater
Flexible Content
Gallery
Clone

Related