Shopify themes, liquid, logos, and UX
Hi, so my problem is that i did this code in base.css - i added it. .collection-list .collection-list__item:has(a[href="/collections/dresses"])
{display:none}
.collection-list .collection-list__item:has(a[href="/collections/jackets"])
{display:none}
.collection-list .collection-list__item:has(a[href="/collections/trousers"])
{display:none}
.collection-list .collection-list__item:has(a[href="/collections/skirts"])
{display:none}
.collection-list .collection-list__item:has(a[href="/collections/shirts"])
{display:none}
.collection-list .collection-list__item:has(a[href="/collections/shoes"])
{display:none}
.collection-list .collection-list__item:has(a[href="/collections/t-shirts"])
{display:none} - for every collection i made for my store. And it works but just for English, when the store is on Croatian its not working. I tried this: .collection-list .collection-list__item:has(a[href="/collections/hr/pages/dresses its still not working.
Hi @snjezana
Please add the store URL.
I think the issue is that the collection & page handle is also being translated to Croatian language; that's why the CSS is not working.
Try using the same CSS but with a translated handle.
Something like the example below for dresses👇
.collection-list .collection-list__item:has(a[href="/hr/collections/haljine"])
{display:none}
Hi @snjezana
I am from Mageplaza - Shopify solution expert.
To fix this issue, please follow these steps:
1. Inspect the URL Structure
- Open your Croatian store version and right-click on the collection link (e.g., "Haljine" for Dresses).
- Click Inspect and check the href value of the <a> tag. It may not be /collections/hr/pages/dresses.
- Copy the correct URL and update your CSS.
2. Modify Your CSS with the Correct URLs
If the URL in Croatian is different, update your CSS accordingly. It should look like:
.collection-list .collection-list__item:has(a[href="/hr/collections/haljine"]) { display: none; }
.collection-list .collection-list__item:has(a[href="/hr/collections/jakne"]) { display: none; }
.collection-list .collection-list__item:has(a[href="/hr/collections/hlace"]) { display: none; }
.collection-list .collection-list__item:has(a[href="/hr/collections/suknje"]) { display: none; }
.collection-list .collection-list__item:has(a[href="/hr/collections/košulje"]) { display: none; }
.collection-list .collection-list__item:has(a[href="/hr/collections/cipele"]) { display: none; }
.collection-list .collection-list__item:has(a[href="/hr/collections/majice"]) { display: none; }
3. Use a More Flexible Selector (Alternative Solution)
If your store uses multiple languages, and you want a dynamic solution, you can use the ^= attribute selector:
.collection-list .collection-list__item:has(a[href^="/collections/dresses"]),
.collection-list .collection-list__item:has(a[href^="/hr/collections/haljine"]) {
display: none;
}
This ensures it works for both English (/collections/dresses) and Croatian (/hr/collections/haljine).
Please let me know if it works as expected!
Best regards
Mageplaza | Top-Rated Shopify Agency | Trusted by 230,000+ worldwide merchants
If our suggestion works for you, please give it a Like or mark it as a Solution!
Should you have any questions or concerns, feel free to contact us via consultant@mageplaza.com
Hi @snjezana
If the solution presented meets your needs and effectively addresses your query, I encourage you to accept it as the chosen answer. This will acknowledge your support and aid fellow community members in identifying reliable and effective solutions for their similar concerns.
Thank you.
Shopify and our financial partners regularly review and update verification requiremen...
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