x

Place for custom CSS in Weebly/Square editor?

Hi all,


I'm having a lot of trouble finding where I can place some code to remove the quantity button from my website. I've found a number of solutions in the forum that look like they would work, but I can't seem to find where I would place them.

All I've found is Site Settings > Integrations > Custom Header Code, but it only allows <script> <noscript> and <meta>.


(https://community.weebly.com/t5/eCommerce/How-to-disable-quot-Quantity-quot-and-quot-Buy-Now-quot-on...)
(https://community.weebly.com/t5/Vote-on-Features/Remove-purchase-and-quantity-buttons-from-product-p...)

Any help would be appreciated!

1,983 Views
Message 1 of 5
Report
4 REPLIES 4

That should let you add style code if you wrap it in style tags, like this:

<style>

/* css rules */

.paragraph { font-size: 10px; }

</style>

1,972 Views
Message 5 of 5
Report

When I do that it says: "Invalid HTML detected. Only <script> <noscript> <meta> are allowed as root HTML tags."

Does any one know if this is a recent change? I pasted this:

<style>
#wsite-com-product-inventory {
display: none !important;
}
</style>

1,971 Views
Message 5 of 5
Report

Oh, ok. I didn't know it did that! There should be an embed code section you can use, although that might add some extra space to the page.

1,966 Views
Message 5 of 5
Report

Just as a future reference, this works fine for me

Add it in settings > tracking tools > code

var sheet = window.document.styleSheets[0];
sheet.insertRule('.font--product-price { display:none !important; }', sheet.cssRules.length);

You'll need to replace .font--product-price { display:none !important; } with your custom css

665 Views
Message 6 of 5
Report