Dynamic taxonomy term with Query Loop

Hi everyone

I’m working on a WordPress site where I’ve set up custom taxonomies using ACF. I’m running a query loop within a block that retrieves posts. My goal is to dynamically associate the relevant taxonomy term name with each block in the loop.

So far I’ve set the class attribute of the block to use the ACF taxonomy term via dynamic data. This works, but instead of just the term name being applied as the class, it returns a link.

I’m new to all this so apologies if it’s not clear! Thanks :slight_smile:

Hi,
Welcome to the forum!

By default, the taxonomy terms are rendered as a link. However, you can deactivate this with the :plain filter so that only the name is displayed.

{post_terms_category:plain}

Best regards,
timmse