Hello, I would like to display the product type inside the product page.
I was wondering if I could add a product type value to the text instead of the vendor.
Site: https://chicpawz.com
Pass: shpseo
A user wants to display the product type on their Shopify product page instead of the vendor information.
Solutions Provided:
{{ product.type }} code in sections > main-product.liquid file at the top of product__titleStyling Implementation:
The user successfully added the product type but needed help with styling. A CSS solution was provided:
.cust-product-type {
color: #fc7060;
font-size: calc(var(--font-heading-scale) * 1.8rem);
font-weight: 800;
margin-bottom: -16px;
}
Issue Resolved:
The user encountered excessive spacing below the product type. This was fixed by adding margin-bottom: -16px; to the CSS, providing a cleaner layout than modifying the product__title margin.
Screenshots were shared throughout showing the implementation steps and final result on the product page.
Hello, I would like to display the product type inside the product page.
I was wondering if I could add a product type value to the text instead of the vendor.
Site: https://chicpawz.com
Pass: shpseo
Hello @AchilleasV
{{ product.type }}
Thank you all for your help! I used this solution.
I was wondering if I could add font-size for mobile screens and desktop screens and a font-color in the product type with this solution.
Please check the screen-shot
And here is code
{{ product.type }}
Simply copy and paste it but keep note you have to change the fdont-size and color a/to your need.
Thanks
This works, thanks! For some reason I get a large space below the product type though, and I can’t find the reason. I could add a margin-top:0; to the product__title, but I was wondering if there is a more elegant solution.
My code:
{{ product.type }}
https://chicpawz.com/products/pet-toy-natural-rubber-resistant-to-biting-and-grinding-teeth
Use margin-bottom
.cust-product-type {
color: #fc7060;
font-size: calc(var(--font-heading-scale) * 1.8rem);
font-weight: 800;
margin-bottom: -16px;
}
Thank you!