# Blog Search

**URL:** <https://community.hubspot.com/t/blog-search/2544>\
**Category:** CMS Development\
**Created:** [June 28, 2017, 2:31pm UTC](https://community.hubspot.com/t/blog-search/2544 "2017-06-28T14:31:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Woodsy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/woodsy/32/63860_2.png) [@Woodsy](https://community.hubspot.com/u/Woodsy)\
**Post date:** [June 28, 2017, 2:31pm UTC](https://community.hubspot.com/t/blog-search/2544/1 "2017-06-28T14:31:02Z")

</div>

How do I add a search to my blog? I have found this article [https://community.hubspot.com/t5/COS-Design-Support/Site-Search-for-blogs/m-p/11308](https://community.hubspot.com/t5/COS-Design-Support/Site-Search-for-blogs/m-p/11308) which gives a rough idea on how to implement a search.

The first part of my listing code looks like this:

\<div class=“row same-height-parent isotope” style=“display:flex; flex-wrap:wrap;”\>  
{% for content in contents %}  
\<div class=“span4 resource-listing-thumb”\>  
{% if content.widgets.new.body.value == ‘new’ %}  
\<div class=“new-banner”\>\</div\>  
{% endif %}  
\<div class=“hs-featured-image-wrapper” style=“width:100%”\>  
\<a href=“{{content.absolute\_url}}” title=“” class=“hs-featured-image-link”\>  
\<img src=“{{content.post\_list\_summary\_featured\_image }}” class=“hs-featured-image”\>  
\<h4\>{{content.name }}\</h4  
\</a\>  
\</div\>  
\</div\>  
{% endfor %}  
\</div\>

How do I adapt this code so that my search field pulls the relevent blogs in?

---

<div class="post-metadata">

**Author:** ![stefen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stefen/32/29274_2.png) [@stefen](https://community.hubspot.com/u/stefen)\
**Post date:** [June 28, 2017, 8:09pm UTC](https://community.hubspot.com/t/blog-search/2544/2 "2017-06-28T20:09:44Z")

</div>

@Woodsy try following this post on [how to build a hubspot blog search](https://www.growwithsms.com/blog/building-a-hubspot-blog-search). Then let me know if you have any questions 🙂

---

<div class="post-metadata">

**Author:** ![Woodsy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/woodsy/32/63860_2.png) [@Woodsy](https://community.hubspot.com/u/Woodsy)\
**Post date:** [June 29, 2017, 10:46am UTC](https://community.hubspot.com/t/blog-search/2544/3 "2017-06-29T10:46:45Z")

</div>

Thanks Stefen, Do I need to create a new site page / landing page? Could the search repopulate the blog listing in the same way that the topic list toggle does? If I have to create a seperate page is there any way to clone the blog listing page and save it as a new site page / landing page?

---

<div class="post-metadata">

**Author:** ![stefen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stefen/32/29274_2.png) [@stefen](https://community.hubspot.com/u/stefen)\
**Post date:** [June 29, 2017, 12:58pm UTC](https://community.hubspot.com/t/blog-search/2544/4 "2017-06-29T12:58:22Z")

</div>

@Woodsy that’s how I’ve done it. But I suppose you could build it into the regular blog listing template with an if statement checking for the query.

---

<div class="post-metadata">

**Author:** ![MarkDBF](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/markdbf/32/99782_2.png) [@MarkDBF](https://community.hubspot.com/u/MarkDBF)\
**Post date:** [February 22, 2018, 10:25pm UTC](https://community.hubspot.com/t/blog-search/2544/5 "2018-02-22T22:25:32Z")

</div>

Hi Stefen,

I checked out this link a month ago, and it looked awesome and simple. Now, I’ve come back to implement and the link is broken. Do you have any suggestions about where else I could find a similar description please?
