full process to remove search feature from header and add the searchbar.
Topic summary
Issue: User wants to relocate the search bar from within the header to directly below it in their Shopify store.
Solution Steps Provided:
-
Access Theme Code: Navigate to Shopify Admin → Online Store → Themes → Actions → Edit code
-
Locate Search Bar Code: Open Sections folder → Find
header.liquidfile → Search for code generating the search bar (typically looks like{% include 'header/search' %}or similar) -
Remove from Header: Comment out or delete the search bar code using Liquid comment tags:
{% comment %}
{% include 'header/search' %}
{% endcomment %}
- Add Below Header:
- Copy the search bar code
- Open Snippets folder → Find
search-bar.liquidfile - Paste the code directly below the header code in
header.liquid
- Save & Preview: Test changes to verify the search bar appears below the header
Status: Original poster asks follow-up question about adding the search bar below header, suggesting they need clarification on the relocation step. Discussion remains open with implementation guidance provided but not yet confirmed as resolved.
To remove the search bar from the header and add it directly below on the header in Shopify, you will need to make changes to your theme’s code. Here are the general steps:
- From your Shopify admin, go to Online Store > Themes.
- Click the “Actions” button for the theme you want to edit, then select “Edit code” from the drop-down menu.
- In the left-hand panel, open the “Sections” folder, then select “header.liquid” file.
- Look for the code that generates the search bar in the header. It may look something like this:
{% section 'header-search' %}
- Comment out or delete the code to remove the search bar from the header.
- Open the “Snippets” folder and select “search-bar.liquid” file.
- Copy the code for the search bar.
- Go back to the “header.liquid” file and paste the code directly below the header code.
Save the changes and preview your store to see if the search bar has been removed from the header and added directly below it. If you encounter any issues or errors, you can always revert the changes or seek assistance from Shopify’s support team or a Shopify expert.
To remove the search feature from the header and add a search bar in Shopify, you’ll need to modify your theme files. Here’s a step-by-step guide:
-
Access the theme editor: Go to your Shopify admin dashboard and navigate to “Online Store” → “Themes”. Find the theme you’re using and click on the “Actions” dropdown, then select “Edit code”.
-
Locate the header section: In the theme editor, find the file that controls the header section. This file is typically named
header.liquidor similar. Open it in the code editor. -
Remove the existing search feature: Search for the code that generates the search feature in the header. It may look something like this:
{% include 'header/search' %}
- Delete or comment out this line of code to remove the existing search feature. You can comment it out by wrapping it with
{% comment %}and{% endcomment %}tags like this:
{% comment %}
{% include 'header/search' %}
{% endcomment %}
and how can i add this below header?