Display post by Tags Filtering & Combine multiple tags

Hello guys, is there any method to filter posts by tags? For example, having a dropdown menu or checkbox to filter posts by having specifics tags:

  • Posts with tagA + tagB + tagC.
  • Posts with tagA + tagC.
    It could be very useful for sites using as news portal. Thank you!

Please explain more.

1 Like

Yes this is easy using dynamic routing. Check the docs.

1 Like

There’s an add-on of Xenforo I really like is: Thread Filter by AddonsLab | XenForo community
It lets user filter posts with multiple tags. You can check the link above for more information @thimiraonline

@Caucasus-and-Mercury : I checked the docs wit dynamic routing, and see something interesting about “channel” - however, it’s not my case, since channel is more like a preset of tags. My need is user can choose whatever tags combination they want.

Thank you all for the replies!

You can do that with Dynamic routing. Can I help you?

Great! Please let me know how I can reach you out?

1 Like

This is how I did filter.

{{#get “tags” limit=“all” filter=“visibility:public+slug:tagA,tagB,tagC” include=“count.posts” order=“count.posts desc”}}

1 Like

Can someone explain to me how dynamic routing solves this problem? Maybe show an example UI? Thank you.

Unless it’s a small number of tags and combinations, I don’t think it does.

I’d solve this problem by writing a bit of Javascript that asks the content API for posts with those specific tags. That way, as users pick the tags they want, you can grab the posts that fit from the API.