Skip to content

Hiding Sidebar Content From Hubspot Search Results

This one catches me out all the time, so I'm making a note of it here for myself and anyone else who may need it.

See that sidebar over there? ➡️ (If you're on desktop, on mobile its's down there ⬇️ )

On first redesign of the site, all those keywords were pulling every blog on every search. So if I searched "Wordpress", this post would come up even though it's not about wordpress because the word is there in the sidebar.

The answer is in the HubSpot documentation, but I always forget where (it's here)

So in my case, I changed

<div class="span4 sidebar" style="" data-widget-type="cell" data-x="8" data-w="4">

to 

<div class="span4 sidebar hs-search-hidden" style="" data-widget-type="cell" data-x="8" data-w="4">

 

IMPORTANT NOTE: The content of your searches will take a few minutes to update so don't despair if you're still getting incorrect results at first.