CMS Development

Julian1936
Contributor

HS search field and search results missing blogs

SOLVE

Hi Everyone,

 

I'm using the built in HS site search but it only appears to be searching pages even though I have blogs ticked as well. I've also tried changing the code in a cloned module to specify BLOG_POST as a type but this does not work either.

 

Can anyone help?

0 Upvotes
1 Accepted solution
MBERARD
Solution
Top Contributor | Elite Partner
Top Contributor | Elite Partner

HS search field and search results missing blogs

SOLVE

Julian1936 thanks for the informations provided!

It looks like your blog posts has noindex meta for robots. This tag excludes the blog posts to be indexed by the search (according to the documentation here). You should remove the meta tag and update your robots.txt during your development phase to test your search 🙂

Hope it helps!

 

Matthieu

matthieu.berard@markentive.com

View solution in original post

6 Replies 6
MBERARD
Top Contributor | Elite Partner
Top Contributor | Elite Partner

HS search field and search results missing blogs

SOLVE

Hi Julian1936,

First question, do you have published blog post or published blog post in the same language of your current page?

 

Matthieu

matthieu.berard@markentive.com

0 Upvotes
Julian1936
Contributor

HS search field and search results missing blogs

SOLVE

Hi Matthieu thanks for getting back to me.

 

As far as I can see yes they are all the same language and they are published. There are two blogs in use and these are the pages I'm using to test it https://landtech.us/search-results - https://landtech.us/blog

 

 

Screenshot 2022-11-02 at 09.45.53.png

 

Screenshot 2022-11-02 at 09.45.45.png

It searches the pages fine but nothing from the blogs.

0 Upvotes
MBERARD
Solution
Top Contributor | Elite Partner
Top Contributor | Elite Partner

HS search field and search results missing blogs

SOLVE

Julian1936 thanks for the informations provided!

It looks like your blog posts has noindex meta for robots. This tag excludes the blog posts to be indexed by the search (according to the documentation here). You should remove the meta tag and update your robots.txt during your development phase to test your search 🙂

Hope it helps!

 

Matthieu

matthieu.berard@markentive.com

Julian1936
Contributor

HS search field and search results missing blogs

SOLVE

Hi again Matthieu and thanks so much for coming back. This did the trick.

 

Strangly I had tried this a couple of days ago but it didn't work. I can only assume the page was heavily cached at my end and wasn't showing the updated results. 

 

Either way this is working now so thank you again.

0 Upvotes
MBERARD
Top Contributor | Elite Partner
Top Contributor | Elite Partner

HS search field and search results missing blogs

SOLVE

Happy to read that 🎉 

 

In case you didn't know about, you can get a fresher version of your page cached by the server by adding the following parameter to the URL: 

?hsCacheBuster=xxxx

It's also easily generated by the HubSpot for developper Chrome extension 

 

Have a nice day!

 

Matthieu

matthieu.berard@markentive.com

Julian1936
Contributor

HS search field and search results missing blogs

SOLVE

Thank you so much for this it is going to make my life a lot easier 🙌

0 Upvotes