Hey there, fellow store owners! As someone who spends a lot of time digging through the Shopify community forums, I often come across those little design tweaks that seem simple on the surface but can turn into a real head-scratcher. One such gem recently popped up, and I wanted to share the insights with you because it's a common desire: getting your product names to consistently show up below the product image on your collection pages.
The Case of the Missing Product Title
Our community member, gladfulspirit, was trying to achieve just this on their store, Garden Treasures Nursery. They wanted to move the card__heading, which holds the product title, below the image area for all product cards – both those with actual product photos and those using a placeholder image. They'd been staring at the code for hours, particularly in card-product.liquid, and suspected it might be a CSS issue related to how different card styles ('standard' vs. 'card') were handled.
The Community Uncovers the Culprit: CSS 'display: none;'
After some diligent digging, gladfulspirit hit the jackpot! The solution wasn't about repositioning the HTML element itself, but rather about uncovering a hidden CSS rule. It turned out the product title was indeed being generated by the Liquid code in card-product.liquid, but it was being suppressed by a display: none; rule in either component-card.css or base.css. This is a classic example of how CSS can override HTML structure in unexpected ways.
Here's the snippet of CSS gladfulspirit found that was causing the trouble:
Specifically, the commented-out line targeting .card--standard.card--text and .card__heading was a strong indicator. When this rule was active (or not properly overridden), it would hide the product title for cards that didn't have a featured image, leading to an inconsistent layout.
Understanding the Liquid Logic: card--media vs. card--text
This is where other community members, like tim_tairli and NKCreativeSoulutions, provided crucial context. They explained that Shopify's Dawn theme (and many others) uses a clever Liquid condition in card-product.liquid to assign different CSS classes to your product cards based on whether they have a featured image or not.
As tim_tairli detailed, if a product has media, it gets the card--media class. If it doesn't, it gets card--text. This dynamic class assignment is fundamental because your theme's CSS then uses these classes to apply specific styling and layouts.
Share:
Start with the tools
Explore migration tools
See options, compare methods, and pick the path that fits your store.