Shopify themes, liquid, logos, and UX
Hi guys,
Website: Vossani.com
How can I change the "SEARCH" on the search page to the actual number of results? Pic for reference:
Solved! Go to the solution
This is an accepted solution.
Hi @flammagreg,
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </body> tag:
<script>
let search_text = document.querySelector('.search--header h1.page--title');
let search_results = document.querySelectorAll('.search-wrapper .grid__item .grid__item.one-third');
if(search_results && search_text) {
let text = search_text.innerText;
search_text.innerText = text.replace('SEARCH', search_results.length)
}
</script>
Here is result:
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍
Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
Hey @flammagreg
It is difficult to do it without access to the store but here is a general way of doing it.
Step 1: Go to Online Store > Theme > Edit code > find the search.liquid or main-search.liquid file
Step 2: Find the line with the text {{search.terms}}
Step 3: Replace the first word of that line with {{ search.results_count }}
I can send you a collaborator request if needed. Please check your DM
♥ If you found my solution helpful, please consider giving it a Like and marking it as the ✔ Accepted Solution
Try our WhatsApp Chat Button Widget with multipe agents. Supachat: WhatsApp Chat Button
A Product of Maverick Studio
This is an accepted solution.
Hi @flammagreg,
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </body> tag:
<script>
let search_text = document.querySelector('.search--header h1.page--title');
let search_results = document.querySelectorAll('.search-wrapper .grid__item .grid__item.one-third');
if(search_results && search_text) {
let text = search_text.innerText;
search_text.innerText = text.replace('SEARCH', search_results.length)
}
</script>
Here is result:
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍
Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025