Here’s a quick solution using simple javascript. It worked for me.
const allEmptyParagraphs = [...document.querySelectorAll('.product-info__description-long p')]
.filter(el => el.innerHTML===' ');
allEmptyParagraphs.forEach(el => el.remove());
Goal: add a collapsible “read more” button to product descriptions in Shopify’s Debut theme.
Proposed approaches:
Outcome: original poster resolved by hiring a developer and confirmed it works on their site. No single code solution was accepted for everyone.
Status: ongoing; others still ask where to install code in Debut and why buttons don’t appear.
Notes:
Here’s a quick solution using simple javascript. It worked for me.
const allEmptyParagraphs = [...document.querySelectorAll('.product-info__description-long p')]
.filter(el => el.innerHTML===' ');
allEmptyParagraphs.forEach(el => el.remove());