Hello Bricks Team and Community,
I’m encountering an issue with dynamic SVG icons associated with custom post type (CPT) categories after updating to Bricks 2.0.2. The icons render perfectly in the Bricks editor but fail to appear on the frontend. Inspecting the frontend code shows no SVG element being added to the DOM at all. This started immediately after the update from a previous version (1.12.5), and I’ve tested extensively without resolution. I’ll detail my setup, steps, and troubleshooting below to help diagnose—hoping for insights from the technical team or others who’ve faced this.
Environment and Setup
- WordPress Version: 6.8.2
- Bricks Version: 2.0.2 (fresh update; no beta or experimental features enabled)
- Plugins Involved:
- ACPT (Advanced Custom Post Types) for managing CPTs and taxonomy fields (version 2.0.35).
- Other active plugins: [Advanced Themer, SEOPress, Not using plugin for caching, but I’ve disabled them during tests]. No known conflicts prior to update.
- Browser Tested: Chrome, Firefox and Brave
Issue Description
Dynamic SVG icons are linked to taxonomy terms in a CPT (e.g., categories for a “Ficar” post type). These icons are uploaded as SVG files to the WordPress Media Library. In Bricks, I use an SVG element with dynamic data sourced from an ACPT taxonomy field. The dynamic tag looks like this: {acpt_tax_categorias-ficar_informacao-das-categorias_icon-da-categoria}
(this pulls the SVG file URL from the category’s custom field).
- In Editor: The SVG renders immediately and correctly when the dynamic data is applied. I can preview, edit styles (e.g., size, color), and it updates live.
- On Frontend: After saving and viewing the page, the SVG is completely absent. Browser inspector shows the parent container (e.g., div or section) but no
<svg>
tag or inline code injected. No console errors, no network requests for the SVG file failing—it’s as if the dynamic rendering skips it entirely. - Pre-Update Behavior: This worked flawlessly in Bricks 1.12.5 version. Icons loaded dynamically based on the CPT category.
This affects multiple pages using query loops or templates for CPT archives/single views. Static SVGs (non-dynamic) render fine on frontend, so it’s isolated to dynamic data.
Steps to Reproduce
- Upload SVG icons to the Media Library (e.g., simple vector icons, no animations or external dependencies).
- In ACPT (or ACF), create a taxonomy (e.g., “categorias-ficar”) for your CPT.
- Add a custom field to the taxonomy terms (e.g., “icon-da-categoria” as an image field returning the SVG URL or raw code).
- Assign SVGs to specific category terms via the taxonomy editor.
- In Bricks Builder:
- Add an SVG element to a template or page (e.g., in a query loop for CPT categories).
- Set the source to “Dynamic Data.”
- Insert the ACPT dynamic tag:
{acpt_tax_categorias-ficar_informacao-das-categorias_icon-da-categoria}
(adjusted for your exact field names). - Preview in editor: SVG appears.
- Save and view on frontend: SVG missing from DOM.
Troubleshooting Steps I’ve Tried
I’ve followed recommendations from the Bricks 2.0 changelog, documentation, and forum threads (e.g., searches for “SVG dynamic frontend 2.0” and “ACF SVG not rendering”). No luck so far:
- Icon Manager: Re-uploaded all SVGs to the new Icon Manager (Bricks > Settings > Icon Manager). Ensured they’re enabled, visible, and part of a set. Re-associated in the dynamic element—still no frontend render.
- CSS and Theme Styles: Tested disabling Cascade Layers. No change.
- Caching/Optimization: Cleared all caches (browser, server-side). Disabled all caching/optimization plugins. Regenerated CSS via Bricks settings.
- Orphaned Elements: Ran the Orphaned Elements Review in Bricks Settings—nothing flagged related to these SVGs.
- Plugin Conflicts: Deactivated all non-essential plugins. Issue persists. Also tested with static vs. dynamic data—static works.
- Debugging: Enabled WP_DEBUG— no errors.
- Alternatives Tested: Switched the ACPT field to return raw SVG code instead of URL. Tried wrapping in a code element or using Bricks’ Icon element instead of SVG—same result.
- Other: Updated all plugins/WP core. Tested on incognito mode and different devices. Permalinks flushed.
I’m stumped—could this be related to how 2.0.2 handles dynamic data for SVGs in taxonomy fields? Or perhaps a bug with ACPT integration post-update? Any patches or workarounds? Here is prints from the Editor and the Frontend.
Editor:
Frontend:
Thanks in advance for any help!
Best,
Pedro Magalhães
Site URL: https://visitefafe.com/onde-ficar/