# blog\_recent\_tag\_posts

**URL:** <https://community.hubspot.com/t/blog-recent-tag-posts/16439>\
**Category:** CMS Development\
**Created:** [September 26, 2019, 1:54pm UTC](https://community.hubspot.com/t/blog-recent-tag-posts/16439 "2019-09-26T13:54:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pm8rsh88](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pm8rsh88/32/78471_2.png) [@pm8rsh88](https://community.hubspot.com/u/pm8rsh88)\
**Post date:** [September 26, 2019, 1:54pm UTC](https://community.hubspot.com/t/blog-recent-tag-posts/16439/1 "2019-09-26T13:54:01Z")

</div>

Hi,  
I have created a module which automatically pulls in the latest blog posts.

The following code works perfectly.

{% set tag\_posts = blog\_recent\_tag\_posts(‘default’, [‘tag’], 4) %}  
{% for tag\_post in tag\_posts %}

However, I want to be able to control which tag to show on individual pages manually. I have a tag field set up, but is there anyway for me to input the tag field directly into [‘tag’]?

I understand you can’t have {{ inside {%, so (‘default’, [’ {{ module.tag\_field}}'], 4) wouldn’t work.

---

<div class="post-metadata">

**Author:** ![Stephanie-OG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stephanie-og/32/73267_2.png) [@Stephanie-OG](https://community.hubspot.com/u/Stephanie-OG)\
**Post date:** [September 26, 2019, 3:05pm UTC](https://community.hubspot.com/t/blog-recent-tag-posts/16439/2 "2019-09-26T15:05:20Z")

</div>

Hi Philip, there is indeed!

If you have the “Tag” field on your module (with the internal name “tag\_field”), the following should work:

`{% set tag_posts = blog_recent_tag_posts('default', module.tag_field, 4) %}`

You don’t need to add the brackets again when you’re setting your variable.

I hope that helps.

* * *

**Stephanie O’Gay Garcia**

HubSpot CMS Design & Development

[Website](http://www.stephanieogaygarcia.com?utm_source=HubSpotCommunity) | [Contact](http://www.stephanieogaygarcia.com/contact?utm_source=HubSpotCommunity)

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

---

<div class="post-metadata">

**Author:** ![pm8rsh88](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pm8rsh88/32/78471_2.png) [@pm8rsh88](https://community.hubspot.com/u/pm8rsh88)\
**Post date:** [September 26, 2019, 3:16pm UTC](https://community.hubspot.com/t/blog-recent-tag-posts/16439/3 "2019-09-26T15:16:42Z")

</div>

Brilliant, that works. I thought I tried that but I think i may have just left in the [‘’]

Thank you
