Making a blog topic list for a specific blog

Highlighted
Occasional Contributor

Hello,

 

I've recently began having problems with making a list of blog topics appear for a certain blog.

 

This is the code I'm using.

 

<h1>Blog Topics
</h1>
{% set my_topics = blog_topics('993703657', 500) %}
<ul>
{% for item in my_topics|sort(False, False, 'name') %}
<li><a href="{{ blog_tag_url(group.id, item.slug) }}">{{ item }}</a></li>
{% endfor %}
</ul>

(code created by tjoyce at https://community.hubspot.com/t5/CMS-Development/How-to-show-all-topics-in-blog-listing/m-p/196160/h...)

 

It worked in the past, but now it always shows content from our default blog no matter what blog I specifiy. Did something change in the specs?

Reply
0 Upvotes
3 Replies 3
Regular Advisor

The blog_topics function is now blog_tags (check out the documentation here), so if you switch is to blog_tags instead, it should work!

 


Stephanie O'Gay Garcia

HubSpot CMS Design & Development

Website | Contact

 

If this helped, please mark it as the solution to your question, thanks!

Highlighted
Occasional Contributor

Stephanie,

 

I've swapped the code to use the current example 

 

{% set my_tags = blog_tags('993703657', 250) %}
<ul>
{% for item in my_tags|sort(False, False, 'name') %}
<li><a href="{{ blog_tag_url(group.id, item.slug) }}">{{ item }}</a></li>
{% endfor %}
</ul>

But it's still showing content from the default blog. Even using the pure vanilla blog listing topic code given as an example for blog_tags (which doesn't have the third to last line modified) shows the same problem.

Reply
0 Upvotes
Highlighted
Occasional Contributor

@Stephanie-OG Are you still there?

Reply
0 Upvotes