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
How can I change "Default Title" For single variant products to say "One Size" for the shogun product variant box shown below in the screenshot
Here's some extra info if needed!
"Your current version: Dawn 7.0.1" (also shogun page builder is used, like referenced above)
https://xyled.online/ is the page that has this and is the only page with this dropdown element which I need help with
Shop password is "fortnitelol"
Hi @1ian ,
Upon checking, I see that you are using the app "Shogun Page Builder", and the code confirms this as well.
Could you please share a screenshot of what you have entered in the Shogun app? This will help us better understand and assist you further.
Additionally, for the product display:
Please let me know how we can further assist you.
Best,
Daisy
Hello @1ian ,
Edit theme.liquid
search for </body>
Now just before to it add this code
<script>
document.addEventListener("DOMContentLoaded", function () {
// Select all <select> elements inside elements with the class `shg-product-selector-wrapper`
const selectors = document.querySelectorAll('.shg-product-variant-select');
selectors.forEach(select => {
// Count the number of options in the select element
const optionCount = select.options.length;
// If there is more than one option, replace the select element with a <span>
if (optionCount <= 1) {
const span = document.createElement('span');
span.textContent = "One size";
// Replace the select element with the <span>
select.parentNode.replaceChild(span, select);
}
});
});
</script>
Regards
Guleria
Hey, thanks for the code! but unfortunately it didn't seem to change the text
I also tried putting it in theme.shogun.landing.liquid just to see but that didn't do it either
I can't find the code in the source code.
Use code in the theme file which is actively used in the theme.