# blog\_recent\_posts not pulling in posts from specified blog

**URL:** <https://community.hubspot.com/t/blog-recent-posts-not-pulling-in-posts-from-specified-blog/12190>\
**Category:** CMS Development\
**Created:** [January 5, 2019, 12:16am UTC](https://community.hubspot.com/t/blog-recent-posts-not-pulling-in-posts-from-specified-blog/12190 "2019-01-05T00:16:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![joetan54](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/joetan54/32/43872_2.png) [@joetan54](https://community.hubspot.com/u/joetan54)\
**Post date:** [January 5, 2019, 12:16am UTC](https://community.hubspot.com/t/blog-recent-posts-not-pulling-in-posts-from-specified-blog/12190/1 "2019-01-05T00:16:07Z")

</div>

Hi,

I’ve created a “Portfolio” blog in Hubspot, which is used to contain portfolio posts. These posts are separate from our regular blog posts.

I’m trying to use the blog\_recent\_posts function to bring in the 6 most recent portfolio posts, however it doesn’t seems to be working as intended.

eg,

{% set posts = blog\_recent\_posts(‘portfolio’, 6) %}

brings in posts from the default blog, and not from the portfolio blog. It is basically the same as

{% set posts = blog\_recent\_posts(‘default’, 6) %}

Is there something I can do so that it will fetch posts from ‘portfolio’ instead of the default blog?

Thanks!

---

<div class="post-metadata">

**Author:** ![JasonRosa](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasonrosa/32/56551_2.png) [@JasonRosa](https://community.hubspot.com/u/JasonRosa)\
**Post date:** [January 7, 2019, 6:35pm UTC](https://community.hubspot.com/t/blog-recent-posts-not-pulling-in-posts-from-specified-blog/12190/2 "2019-01-07T18:35:25Z")

</div>

Hey @joetan54 instead of “portfolio” in your code here:

{% set posts = blog\_recent\_posts(‘portfolio’, 6) %}

you’d want to use your blog’s ID. So it would look like this with your ID in place of “YOUR BLOG ID”:

{% set posts = blog\_recent\_posts(‘YOUR BLOG ID’, 6) %}

You can get the ID for your blog from the URL in the editor by going to your blog dashboard (Marketing \> Website \> Blog \> Choose the Portfolio blog in the list of blogs in the top left corner). It will be the set of numbers after “/blogs/” in the URL.

 ![BlogID.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/c/bc159f5b6628d2dacb527efc0b7e2d61a60393b9.png)

---

<div class="post-metadata">

**Author:** ![joetan54](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/joetan54/32/43872_2.png) [@joetan54](https://community.hubspot.com/u/joetan54)\
**Post date:** [January 7, 2019, 7:12pm UTC](https://community.hubspot.com/t/blog-recent-posts-not-pulling-in-posts-from-specified-blog/12190/3 "2019-01-07T19:12:45Z")

</div>

That works great, thank you!

---

<div class="post-metadata">

**Author:** ![JasonRosa](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasonrosa/32/56551_2.png) [@JasonRosa](https://community.hubspot.com/u/JasonRosa)\
**Post date:** [January 7, 2019, 7:16pm UTC](https://community.hubspot.com/t/blog-recent-posts-not-pulling-in-posts-from-specified-blog/12190/4 "2019-01-07T19:16:09Z")

</div>

Happy to hear that is working for you! No problem at all.

---

<div class="post-metadata">

**Author:** ![AWebDev](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/awebdev/32/62359_2.png) [@AWebDev](https://community.hubspot.com/u/AWebDev)\
**Post date:** [June 3, 2021, 5:00pm UTC](https://community.hubspot.com/t/blog-recent-posts-not-pulling-in-posts-from-specified-blog/12190/5 "2021-06-03T17:00:33Z")

</div>

I can not see any change in the URL when I select other blogs, it stays the same like this: [Blog | HubSpot](https://app.hubspot.com/website/276336/blog/posts)  
no matter which blog I select from the above dropdown? What to do?

---

<div class="post-metadata">

**Author:** ![AJLaPorte](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ajlaporte/32/11058_2.png) [@AJLaPorte](https://community.hubspot.com/u/AJLaPorte)\
**Post date:** [June 3, 2021, 8:43pm UTC](https://community.hubspot.com/t/blog-recent-posts-not-pulling-in-posts-from-specified-blog/12190/6 "2021-06-03T20:43:15Z")

</div>

Hey @AWebDev,

You should be able to navigate here: **[Settings \> Website \> Blog](https://app.hubspot.com/l/settings/website/blogs)** and then use the blog switcher dropdown on the top of the options to select the blog. From there, you should then see the URL change with the proper blog id.

 ![Settings.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/1/912bbffa67e3b23ff4943f07b5dc84a3f31b9380.png)

Using that ID should do the trick for you 🙂

-AJ

---

<div class="post-metadata">

**Author:** ![DTesch](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dtesch/32/194402_2.png) [@DTesch](https://community.hubspot.com/u/DTesch)\
**Post date:** [October 18, 2023, 3:46pm UTC](https://community.hubspot.com/t/blog-recent-posts-not-pulling-in-posts-from-specified-blog/12190/7 "2023-10-18T15:46:35Z")

</div>

FYI in 2023 this no longer works - I am digging and digging to find my blog’s ID that isn’t the default, and it’s nowhere to be found in the URL or anywhere else that I can find.
