Pull tags from specific blog posts

Hello!

Could someone help me figure out what code I need to use in order to pull the tags that are used on each blog post?

For example, I’m creating a module that pulls each blog post and shows a preview of it with a link to it, but I’d also like to show the tags in the preview that are listed for each.

I’m only able to pull all of the tags used: {{ blog_tags(“default”, 250) }} but can’t link it to only pull the tags for each specific post.

Thank you in advance for any help!

Hii @SRinehart

You can clone inbuilt post filter module and do require changes as shown in below image

After that you need to select tag in this as shown in below

You will get output of list of tags and related their post as shown in below image

Hope this helps! If we were able to answer your query, kindly help the community by marking it as a solution. Thanks and Regards.

@SRinehart

Consider using

{{ content.tag_list }}

when pulling each blog post for preview.

Thank you for the replies! I tried {{ content.tag_list }} and that didn’t work, so I tried {{ post.tag_list }}, and that worked perfectly!

SOLUTION: {{ post.tag_list }}

The solution is the .tag_list. The object you query depends on your markup. Most templates now use content instead of post. Glad you realized that was your case.

Thanks for the solution here!