Impulse Theme - product description tab to be open by default

Impulse Theme - product description tab to be open by default

ashleerae
New Member
8 0 0

I'm trying to get the product description tab to stay open by default when you view the product.  I've seen other older posts about this and the code didn't work.  Please let me know how to make this happen if you have an idea! Thanks!

Site is shopaiti.com

Replies 8 (8)

Moeed
Shopify Partner
5909 1603 1907

Hey @ashleerae 

 

Your website is password protected, can you share the password as well?

 

Best Regards,

Moeed

- Get a quick Shopify quote – Click here!

- Need a Shopify Specialist? Chat on WhatsApp

- Custom Design | Advanced Coding | Store Modifications


ashleerae
New Member
8 0 0

lilgoldgal5

Moeed
Shopify Partner
5909 1603 1907

Hey @ashleerae 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<script>
document.addEventListener('DOMContentLoaded', function() {
  var descriptionButton = document.querySelector('[aria-controls="Product-content-description10464607961110"]');
  var descriptionContent = document.getElementById('Product-content-description10464607961110');
  
  if (descriptionButton && descriptionContent) {
    descriptionButton.setAttribute('aria-expanded', 'true');
    descriptionButton.classList.add('is-open');
    descriptionContent.classList.add('is-open');
    descriptionContent.style.height = 'auto';
  }
});
</script>

RESULT:

Moeed_0-1729278262345.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Get a quick Shopify quote – Click here!

- Need a Shopify Specialist? Chat on WhatsApp

- Custom Design | Advanced Coding | Store Modifications


ashleerae
New Member
8 0 0

Thanks! It looks like it's just working for the Pearl Huggie but when I go to other products, the description is still closed.

DaveedValencia
Shopify Partner
43 7 7

Hello,

 

On the impulse theme, go to customizer > product > then click on Description on the left side and uncheck show tabbed. This way the description is always visible. I've attached a screenshot below.

 

DaveedValencia_0-1729280858061.png

 

ashleerae
New Member
8 0 0

Thanks! I like the tab feature just want it to be open by default and can still be closed manually.

DaveedValencia
Shopify Partner
43 7 7

gotcha! Are you familiar with editing the liquid code templates? If so, I can share the code changes so the description is open by default instead of closed. But it would require making a few edits to the liquid code.

ashleerae
New Member
8 0 0

That would be awesome! Yes I'm familiar with code changes.