Show `Searched text` in Search Results Header

I’m tried to figure out how to have the Searched Text to be on the Search Results header. An example would be when I searched for Design and in the search result page, the header would show Search Results for Design. Is it possible to achieve this natively in Webflow?

See the screenshot below:

Hi @darusim_ws,

I’ve just implemented the very same thing on my site.

Copy and paste this code into a HTML embed and add any classes to the paragraph tag as appropriate:

<p id="href"></p>
<script>
	var url = window.location.search;
		url = url.replace("?query=", ''); // remove the ?query=
  document.getElementById("href").innerHTML ="Search results for: " + url;
</script>

Let me know if that helps!

Many thanks,

Lee

1 Like

it is adding “+” between spaces …