Skip to content

Instantly share code, notes, and snippets.

@WazzaJB
WazzaJB / acf-taxonomy-depth.php
Last active July 24, 2024 18:14
Advanced Custom Fields Taxonomy Depth Location Rule
<?php
//ADD RULE TO SECTION
add_filter('acf/location/rule_types', 'acf_location_rules_types');
function acf_location_rules_types( $choices )
{
$choices['Other']['taxonomy_depth'] = 'Taxonomy Depth';
return $choices;
}
//MATCHING OPERATORS