Browser: Edge, Chrome
OS: Windows 11
Video: Button Link Issue Explained 🔗 | Loom
Hello everyone,
I have a custom Bricks Query (bricks/query/run
) that fetches data from an external API and stores it as a Custom Post Type (tariff
). One of the stored Post Meta fields is link_url
, which contains a valid URL.
Problem:
{cf_link_url}
is correctly displayed in a Code Element.{cf_link_url}
does not work in Buttons or Basic Text elements → Thehref
attribute remains empty (href=""
).
Example HTML output in the frontend:
Broken Button (href is empty):
<a class="brxe-button btn--primary bricks-button" href="">Sign up online</a>
Correct output in a Code Element:
<a class="brxe-button btn--primary bricks-button" href="https://login.stadtwerke-juelich.de/...">Sign up online</a>
Additional Information:
- The URL is stored as Post Meta using:
update_post_meta($post_id, 'link_url', $url);
- The correct URL is visible in the WP Admin interface under custom fields.
- Bricks does not process
{cf_link_url}
correctly in Buttons & Text elements. - Bricks either does not modify the
href
or renders it as an empty string (href=""
).
Is this a known bug? Is there a way to make {cf_link_url}
work correctly inside Bricks buttons?
Thanks for your help!