How can I create a dropdown menu to filter blog posts by tags?

Trying to create a dropdown menu to filter blog posts by tags on one page. I’ve tried every possible code. I know the code to just show a list of tags, but I want them to appear in a dropdown menu.

This is the code that I have so far. But the problem is that it doesn’t go to the selected tag.

It goes to this: https://www.thehorsebc.world/blogs/google-blogger/tagged/tag

Instead I need for it to go to the selected tag: https://www.thehorsebc.world/blogs/google-blogger/tagged/backtalk

I know it’s something to do with the jQuery which I am not very good at. Any help would be appreicated.

Browse by tag:

Did you ever resolve this situation? I need the same functionality and hoping you have a solution. :slight_smile:

1 Like

I`m looking for a solution to this as well. Anyone?

I just recently created and published an app that lets you create multiple dropdown blog post filters using tags. If you are still facing this issue, feel free to check it out here on the Shopify App store with 14 days free trial available. Would really love to hear your thoughts!

Try This:

3 Likes

Thank you for the code. The Filter works and pulls in the tags. In the inspector, the correct URLs are there, but it is not redirecting to the tagged URL when selecting the filter. Thoughts?

Did you find a way around this? I’ve run into the same issue with URLs not redirecting.

I did not, and I put this on the back burner after messing with it for awhile.

@Charlie_Horse or @KetanKumar would you be able to help?

1 Like

@LinnN

can you please share store url

Hello
It’s filter is not working after click on tag show all blogs not only respective tags blogs

Although this is now an old thread, I still found it useful for the exact same needs as those above. I’m using the Dawn theme and the issue is that trying to run the jQuery script fails as jQuery is not being loaded. The simple way to fix this is remove the whole jQuery section and change the

1 Like