All things Shopify and commerce
Hi Shopify community,
I'm in the process of setting up my first ecommerce store.
I have been trying to troubleshoot this issue with no success. I am using the Dawn Theme and the search results page does not adhere to my theme colour settings.
I have manually changed the background colour to match the theme in the 'custom CSS' section but can't figure out how to change all of the text to 'white'.
Also, I would prefer the search bar to also match the background colour, but as a priority I'd like to solve the unreadable text issue first.
Any help would be greatly appreciated.
Cheers
Solved! Go to the solution
This is an accepted solution.
If anyone else runs into this issue, I've found a way to fix it. However, it's not very efficient or elegant.
I inserted the following code into the 'custom css' box for the 'search results' template
{
background: #292929 !important;
}
.card__heading {
color: white;
}
.card__information {
color: white;
}
.price {
color: white;
}
h1.h2 {
color: white;
}
.facets__summary {
background: #292929;
color: white;
}
.facet-filters__sort {
background: #292929;
color: white;
}
.facet-filters__field {
background: #292929;
color: white;
}
.facet-filters__label {
background: #292929;
color: white;
}
.product-count__text {
background: #292929;
color: white;
}
.facets__heading {
background: #292929;
color: white;
}
.mobile-facets__open {
background: #292929;
color: white;
}
Cheers
This is an accepted solution.
If anyone else runs into this issue, I've found a way to fix it. However, it's not very efficient or elegant.
I inserted the following code into the 'custom css' box for the 'search results' template
{
background: #292929 !important;
}
.card__heading {
color: white;
}
.card__information {
color: white;
}
.price {
color: white;
}
h1.h2 {
color: white;
}
.facets__summary {
background: #292929;
color: white;
}
.facet-filters__sort {
background: #292929;
color: white;
}
.facet-filters__field {
background: #292929;
color: white;
}
.facet-filters__label {
background: #292929;
color: white;
}
.product-count__text {
background: #292929;
color: white;
}
.facets__heading {
background: #292929;
color: white;
}
.mobile-facets__open {
background: #292929;
color: white;
}
Cheers
I figured out that the search page settings and therefore the liquid code does not include a color-scheme.
So instead of adding all your custom css, I opted to hard code the color-scheme into the section s/main-search.liquid file. In my case, I wanted color-scheme-1 so I added it to this line:
<div class="template-search{% unless search.performed and search.results_count > 0 %} template-search--empty{% endunless %} section-{{ section.id }}-padding color-scheme-1">
Nice one!
Thanks for sharing - that's a much more more straightforward solution than mine!
Fantastic - this is really helpful! Thanks 😁
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024