Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I would like to edit the (Men's and Women's) - custom coded to all caps (MEN'S and WOMEN'S) in homepage and collection page. Could you please advise where to edit the code?
The Shopify page is colehaan-my.myshopify.com.
Hi @RyanCheong ,
To ensure the text transformation is applied correctly across all product titles, please add the following JavaScript code in your theme.liquid file, just before the closing </body> tag:
<script>
$('.product-block__title').each(function() {
const html = $(this).html();
const updatedHtml = html
.replace(/\bMen's\b/gi, "MEN'S")
.replace(/\bWomen's\b/gi, "WOMEN'S");
$(this).html(updatedHtml);
});
</script>
Steps:
In your Shopify admin, go to Online Store > Themes.
Click Actions > Edit Code on your current theme.
Open the layout/theme.liquid file.
Scroll to the bottom and paste the above <script> block just before the </body> tag.
Save the changes.
Hi @RyanCheong
The simple way is to add a code to make all your product titles uppercase.
You can do that by adding this code to Custom CSS in Sales channels > Online Store > Themes > Customize
.product-list .product-block__title { text-transform: uppercase; }
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.