etobic
October 2, 2022, 3:59pm
1
Bricks Version : latest
Browser : Chrome 90
OS : Win
URL : https://kamilp1.sg-host.com/project/well-optimized-wp-website-for-the-nail-studio-in-kosice-slovakia/
Strange behavior to me: I have a “Basic text” element which pulls up dynamic data (tag category) and I have it styled (color, transform, …) When I apply a link to it with the “Link to ” it removes the styling on the front end (it’s OK in the editor…) plus the link doesn’t work…
Am I just not knowing what I am doing?
https://www.loom.com/share/f633179bae134fb9a0933112929f96e7
timmse
October 4, 2022, 10:49am
2
Hi Kamil,
Thanks so much for your report!
{post_terms_category}
returns the category as a link, and a link in a link doesn’t work
Best regards,
timmse
etobic
October 4, 2022, 11:03am
3
Any time. Glad I could help with squashing a bug.
Hi Stefan,
Just on this, is there a way to bring in the post terms category without it being a link, just the text?
Thanks
Mick
timmse
October 4, 2022, 3:39pm
5
Sure, there is a filter:
When rendering the terms assigned to a post using the dynamic data tag {post_terms_my_taxonomy}, Bricks wraps each term with a link to the term archive page. To disable this default behavior, you may hook into the bricks/dynamic_data/post_terms_links...
Alternatively, you can write a custom function that returns the categories without a link and call it with {echo:yourFunction}.
0x7466
October 21, 2022, 1:42pm
6
Hi @timmse ,
looks like the hook has some problem? I’ve tried to disable links like described, but it isn’t working.
Tobias
0x7466
October 21, 2022, 1:57pm
7
Found it. For ACF taxonomy fields you have to add:
add_filter( 'bricks/acf/taxonomy/show_as_link', '__return_false' );`
1 Like