Overview
The filter hook ctdqb_item_content_html allows you to modify the structured content sections of each item in the query results before they are rendered as HTML. The filter receives an array of content sections (like title, image, excerpt, etc.) which can be modified, reordered, or extended.
Hook Parameters
- $ordered_content – – Array of content sections, with keys representing section types and values containing the HTML for each section
- $props – Array of module properties.
- $datum – Array of current post data.
Understanding the Content Sections Array
The array contains key-value pairs where: `$ordered_content`
- Keys are section identifiers (e.g., ‘title’, ‘image’, ‘excerpt’, ‘terms’, etc.)
- Values are pre-formatted HTML strings for each section
Common section keys include:
- image – Featured image HTML
- title – Post title HTML
- author – Author information HTML
- date – Formatted date HTML
- terms – Taxonomy terms HTML
- excerpt – Post content/excerpt HTML
- link – Read more link HTML
- woo – WooCommerce product data HTML
- cf – Custom fields HTML
- dl_content – Divi Layout content HTML
The order of items in the returned array determines the order in which they will be displayed in the final output.
0 Comments