Buy me a coffee

Accordion on Individual Products

Suppose we have 3 product tags with names: design, branding, marketing

we need to add 3 accordions to the products that belong to these 3 tags.

Need a help? Just contact me via form below, always to help for free

accordion1-min

You can see a demo here

#1. First you need to create 3 Not Linked Pages with name:

  • Accordion-Design – URL SLUG: /accordion-design
  • Accordion-Branding – URL SLUG: /accordion-branding
  • Accordion-Marketing – URL SLUG: /accordion-marketing

accordion2-min

accordion3-min

#2. Add 3 Accordion into 3 pages

accordion7

accordion8-min

accordion9-min

#3. Install this plugin (paid plugin)

(do Step 1, Step 2 only)

#4. Add this code into Shop Page Header

You can get this code in #3

accordion4-min

#5. Add this code under #4

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
<script>
jQuery(document).ready(function($){
  $('[data-target*="-design"]').appendTo('.tag-design .ProductItem-details-excerpt');
  $('[data-target*="-branding"]').appendTo('.tag-branding .ProductItem-details-excerpt');
  $('[data-target*="-marketing"]').appendTo('.tag-marketing .ProductItem-details-excerpt');
})
</script>

accordion5-min

#6. Add this code into Design > Custom CSS

[data-wm-plugin] {
  display: none;
}
.ProductItem-details-excerpt [data-wm-plugin] {
  display: block !important;
}

accordion6-min

Done. You can see a demo here

accordion10-min

accordion11-min

accordion12-min

Ask me a question, free

If your site is private or in trial, just setup password and share url. See how to: https://beaverhero.com/squarespace-how-to/
Please check your email carefully. Recently I got a lot of questions with wrong emails.

If you haven't heard from me within 24 hours please check your junk/spam folder