Support

Account

Home Forums Backend Issues (wp-admin) Hide Taxonomy Term fields on the main category page Reply To: Hide Taxonomy Term fields on the main category page

  • Use a custom location rule that overrides the ACF location rule for taxonomy https://www.advancedcustomfields.com/resources/custom-location-rules/

    
    // priority 20 runs after ACF built in filter
    add_filter('acf/location/rule_match/taxonomy', 'acf_location_rules_match_taxonomy', 20, 3);
    function acf_location_rules_match_taxonomy($match, $rule, $options) {
      if ($rule['param'] == 'taxonomy' && !isset($_GET['tag_ID'])) {
        // if the rule is for taxonomy but $_GET['tag_ID'] is not set
        // then this is the main taxonomy page and not a term page
        // set match to false
        $match = false;
      }
      return $match;
    }
    

    I’m glad you brought this up, there are many times when I don’t want fields to show on this page and your question made me want to figure out how to do it.