Shopify themes, liquid, logos, and UX
Hello,
I have 3 tshirts A, B, C. I have created an automation collection and all 3 tshirts have the tag "t-shirt"
My automated collection pulls in all tshirts with the tag and has been added as a "featured collection" section on each product page.
When viewing the product page for tshirt (A), how do I exlcude it from the collection so that I only see tshirt B & C?
Does anyone know the code to edit to obtain this result?
Solved! Go to the solution
This is an accepted solution.
Go to your Online store > Themes > Edit code > open card-product.liquid file, find this line of code
{%- if card_product and card_product != empty -%}
Add this code before
{% unless card_product.id == product.id %}
<style>
.collection .grid__item { display: none; }
.collection .grid__item:has(.card-wrapper) { display: list-item; }
</style>
And then go to the very bottom of the file, add this code at the bottom
{% endunless %}
- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
Varies wildly by theme, always communicate in concrete terms.
Theme names, reference urls,etc
https://community.shopify.com/c/blog/how-to-get-support-from-the-community/ba-p/2254458
Roughly f the section is javascript based, you would need to find the featured collections product forloop
then use some liquid logic similar to the following though the variable names may be different.
{% if current_product.handle == product.handle %} {% continue %} {% endif %}
Good Hunting.
If you need this customization done for you then contact me by email for services.
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hi, could you share your store link?
- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
This is an accepted solution.
Go to your Online store > Themes > Edit code > open card-product.liquid file, find this line of code
{%- if card_product and card_product != empty -%}
Add this code before
{% unless card_product.id == product.id %}
<style>
.collection .grid__item { display: none; }
.collection .grid__item:has(.card-wrapper) { display: list-item; }
</style>
And then go to the very bottom of the file, add this code at the bottom
{% endunless %}
- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
this worked! thank you
You are very welcome
- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
Add an additional "class" to "LI" of the featured collection liquid file, please refer to the below screenshot.
Write the below CSS in main-product.liquid file
<style>
._featered-{{ product.id }}{display:none}
</style>
Please refer to the below screenshot for reference.
Hope this will help....
thank you. will try this and get back to you
this did not work. it aligns the collection vertically and doesnt remove the featured product
Can you share the preview theme URL
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