# Blog Post Filter Dropdown not working

**URL:** <https://community.hubspot.com/t/blog-post-filter-dropdown-not-working/30639>\
**Category:** CMS Development\
**Created:** [January 22, 2021, 1:30pm UTC](https://community.hubspot.com/t/blog-post-filter-dropdown-not-working/30639 "2021-01-22T13:30:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpkreative](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kpkreative/32/29572_2.png) [@kpkreative](https://community.hubspot.com/u/kpkreative)\
**Post date:** [January 22, 2021, 1:30pm UTC](https://community.hubspot.com/t/blog-post-filter-dropdown-not-working/30639/1 "2021-01-22T13:30:40Z")

</div>

![36869i0E55DDD03A805605.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/6/16bbf177a1a28455cbef1e23c1e928efbea71191.jpeg)

 ![36870iBD005E02F4698BEC.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/3/c340706b091b5fc7b778f20c069410315f2d2bb3.jpeg)  
I have added a dropdown tag filter to my blog, though for some reason, it is not displaying the tags of the posts that are published in the dropdown. Strangely i have used this method for other blogs before without any issues.

The dropdown displays visually as it should, though published tags do not show from the dropdown list.

I have used the following code within my blog listing template:

\<div class=“tag-dropdown”\>

{% set my\_topics = blog\_topics(‘default’, 250) %}

\<select id=“blog-topics”\>

\<option\>Filter by topic\</option\>

{% for item in my\_topics %}

\<option value=“{{ blog\_topic\_url(group.id, item.slug) }}”\>{{ item }}\</option\>

{% endfor %}

\</select\>

\</div\>

JS

\<script\>  
$(function(){  
$(‘#blog-topics’).on(‘change’, function(){  
var link = $(this).val();  
if(link != “Filter by topic”){  
window.location.href = link;  
}  
});  
});  
\</script\>

Any suggestions would be hugely appreciated.

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [January 25, 2021, 6:04pm UTC](https://community.hubspot.com/t/blog-post-filter-dropdown-not-working/30639/2 "2021-01-25T18:04:06Z")

</div>

The blog\_topics function has been deprecated, you should use blog\_tags instead. Also blog\_tag\_url instead of blog\_topic\_url.

{% set my\_topics = blog\_tags(‘default’, 250) %}

{{ blog\_tag\_url(group.id, item.slug) }}

---

<div class="post-metadata">

**Author:** ![kpkreative](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kpkreative/32/29572_2.png) [@kpkreative](https://community.hubspot.com/u/kpkreative)\
**Post date:** [January 25, 2021, 6:10pm UTC](https://community.hubspot.com/t/blog-post-filter-dropdown-not-working/30639/3 "2021-01-25T18:10:49Z")

</div>

Piers, you are na absolute hero. Thank you so much for your feedback on my post.  
I was not aware of the 'blog\_topics being deprecated. I last used this method around 6 or so months ago, so it’s great to finally see a solution.

I appreciate your time. Thank you once again.
