1. Home
  2. Docs
  3. Divi Query Builder
  4. Action & Filter Hook...
  5. Alter Term Data

Alter Term Data

Overview

The ctdqb_get_term_data filter hook allows you to modify or extend the term data array that is collected for each taxonomy term within the Query Builder loop. This filter provides access to all the gathered term information and enables you to add custom data or modify existing values before the term is rendered.

Hook Parameters

  1. $props – Array of module properties.
  2. $term_data -Array containing all collected term data and metadata.

Understanding the Term Data Array

The $term_data array contains comprehensive information about each taxonomy term:

Core Term Data

  • id – Term ID
  • title – Term name
  • permalink – Term archive URL
  • taxonomy – Taxonomy name
  • slug – Term slug
  • description – Term description

Term Hierarchy

  • parent – Parent term ID (0 if no parent)
  • level – Hierarchical level (0 for top-level terms)
  • term_group – Term group ID
  • term_taxonomy_id – Term taxonomy relationship ID

Statistics

  • count – Number of objects associated with this term

Media

  • img_html – Term image HTML (when image display is enabled)

Custom Fields

  • custom_fields – Array of custom field data
  • custom_fields_html – Rendered custom fields HTML
  • cf_link – Custom field link value

Divi Layout Data

  • dl_content – Divi layout content (when enabled)

0 Comments

Submit a Comment

How can we help?