blog tags not linking correctly

Hi folks
I am showing a custom news listing where the user can select a number of blog posts to display.

{% for item in module.blog_article.page_field %}

{% set contents = content_by_id(item) %}
{% for content in contents %} 

<div class="col">
<a href="{{content.absolute_url}}"><img src="{{ content.post_list_summary_featured_image }}" alt="{{ content.name }}" loading="lazy"></a>

{% for topic in content.topic_list %}<a href="{{ blog_tag_url(group.id, topic.slug) }}" class="tag">{{ topic.name }}</a>{% endfor %}			

<h5><a href="{{content.absolute_url}}">{{ content.name }}</a></h5>
<a href="{{content.absolute_url}}"><strong>> Read more</strong></a>

</div>

{% endfor %}
{% endfor %} 

I’m finding that the tags are showing but the links are either referencing an old blog or not linking anywhere at all (all the other content of the post is showing correctly). I’m completely stumped as I’ve used this code on many other sites.
Is this anything to do with the page being in a staged environment perhaps? I did try a test publish but still had the problem though.

Any help appreciated!

Thanks

Hi @DM2,

Your

blog_tag_url

is not working because of the

group.id

prints nothing.

The

group.id

hubL variable only works on blog listings and posts, not on pages.

To fix it, you must replace

group.id

with your actual blog ID.

{{ blog_tag_url(00000000, topic.slug) }}

Best regards,

Abraham Ernesto

Brilliant - @GiantFocal thank you so much for this.