How can I modify the search bar options on my site?

I’m looking into changing the search bar options on my Shopify site. We want to remove the ‘page & posts’ section? Is there an easy way in doing this? Please see the picture below:

Thanks in advance

1 Like

Go to your theme and click Edit code. Paste the contents of your search.liquid file here and I can show you where that section is so you can hide it.

1 Like

@lauryn_tinwared

sorry for that issue can you please check your theme setting its allow this option

Yeah, you might be able to hide it via customizing your theme. What @KetanKumar said is go to Online store > Themes and on your theme click “Customize”. Once you’re in the theme customizer, do a search and it should show you the options for your search page. If you don’t see an option to hide that section there, you’ll need to hide it in code like I said.

1 Like

Hi,

Thank you. I have barely anything in my search.liquid file only this: {% section ‘static-search’ %}

However I have a

search.sc-qs-ac-5198.liquid

{% comment %} Added by SolverCircle for Quick Order App {% endcomment %}
{% layout none %}

{% capture output %}
{
{% if customer %}
“CustomerID” : “{{customer.id}}”,
{% endif %}
“Items”:
[
{% for result in search.results offset:startIndex limit:20 %}
{% assign thumbURL = result.images[0] | product_img_url: ‘thumb’ %}
{% assign mainURL = result.images[0] | img_url : ‘large’ %}
{
“id”:“{{result.id}}”
,“title”:{{result.title | json}}
,“price”:“{{result.price}}”
,“images” : [{“src” : {{thumbURL | json}}}]
,“image” : [{“src” : {{mainURL | json}}}]
,“variants”:
[
{% for variant in result.variants %}
{
“id”:“{{variant.id}}”
,“title”:{{variant.title | json}}
,“price”:“{{variant.price}}”
,“compare_at_price”:{{variant.compare_at_price | json}}
,“inventory_management”:{{variant.inventory_management | json}}
,“inventory_policy”:{{variant.inventory_policy | json}}
,“inventory_quantity”:“{{variant.inventory_quantity}}”
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
]
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
]
}
{% endcapture %}

{% comment %} Enclose in square brackets and output the json object {% endcomment %}
{{ output | strip_newlines }}

Thanks!

Can you go to the Sections in the left pane and show me what’s in ‘static-search.liquid’?

Are you using an app called Quick Order?

1 Like

Yes we use Quick order.

This is what is in there:

{% assign enable_content = section.settings.enable_search_articles_pages %}

{% assign paginate_by = section.settings.results_per_page_range %}

{% paginate search.results by paginate_by %}

{% comment %}
Calculate number of results by type.
{% endcomment %}
{% assign product_count = 0 %}
{% assign article_count = 0 %}
{% assign page_count = 0 %}

{% for item in search.results %}
{% if item.object_type == ‘product’ %}
{% assign product_count = product_count | plus: 1 %}
{% endif %}

{% if enable_content %}
{% if item.object_type == ‘article’ %}
{% assign article_count = article_count | plus: 1 %}
{% endif %}

{% if item.object_type == ‘page’ %}
{% assign page_count = page_count | plus: 1 %}
{% endif %}
{% endif %}
{% endfor %}

{% comment %}
Calculate the number of result types.
{% endcomment %}
{% assign type_count = 0 %}
{% if product_count > 0 %}{% assign type_count = type_count | plus: 1 %}{% endif %}
{% if article_count > 0 %}{% assign type_count = type_count | plus: 1 %}{% endif %}
{% if page_count > 0 %}{% assign type_count = type_count | plus: 1 %}{% endif %}

{% include 'breadcrumbs' %}
{% include 'page-search-form', enable_content: enable_content %}
{% if product_count > 0 %} {% for item in search.results %} {% if item.object_type != 'product' %}{% continue %}{% endif %} {% include 'product-grid-item', product: item %} {% endfor %} {% else %} {% assign title = 'search.general.no_search_performed' | t %}

{% if search.performed %}
{%
include ‘search-sanitizer’,
search_terms: search.terms
%}

{% assign title = ‘search.general.no_results_products_title’ | t: terms: sanitized_terms %}

{% if paginate.current_page > 1 %}
{% assign title = ‘search.general.no_more_results_products_title’ | t: terms: sanitized_terms %}
{% endif %}
{% endif %}

{{ title }}

{% if search.performed %}

{{ ‘search.general.view_all_products’ | t }}

{% endif %}

{% endif %}

{% if enable_content and search.performed %}

{% include 'results-search-content', title: 'search.general.posts_title', results: search.results, results_type: 'article', results_count: article_count %}

{%
include ‘results-search-content’,
title: ‘search.general.pages_title’,
results: search.results,
results_type: ‘page’,
results_count: page_count
%}

{% endif %}

{% include ‘pagination’ %}

{% endpaginate %}

{% schema %}
{
“name”: “Search results”,
“class”: “search–section”,
“settings”: [
{
“type”: “range”,
“id”: “results_per_page_range”,
“label”: “Results per page”,
“min”: 24,
“max”: 48,
“step”: 12,
“default”: 24
},
{
“id”: “enable_search_articles_pages”,
“type”: “checkbox”,
“label”: “Show blog posts and pages in search results”,
“default”: true
}
]
}

{% endschema %}

Ok, that’s not it. You must be using some app that creates the search dropdown. I’m guessing you can either customize the dropdown in that app, or you can find the liquid file that app uses and edit the code. If you know what app it is you can try that. Otherwise you could give me developer access to your store and I could take a look for you (send me a private message).