Add a unique accordian to each woocommerce product page

Hi there, got another one for you.

I am thinking about adding an accordion to each product page. Sample link :- https://www.ijconline.co.uk/product/birthday-card-inserts/

I like the smart and concise way it can hold a lot of information. I used a shortcode created as a global block and pasted it into the content area of the woocommerce standard product page.

What is the best method to achieve this as per problem below?

I cannot see a way to produce a blank accordion to be filled out on the product page itself. If I produce it as a global block, then I am going to have an awful lot of accordion blocks floating around as I would need one unique accordion to one unique product page.

Using Pro

Advise as always greatly appreciated.

Many thanks

Ian

Hi @Supajiggi,

Thanks for reaching out.

I suggest that you will use the accordion shortcode each of your single product page description tab/main tab, you can check here the list of shortcodes we have.

See the example accordion shortcode below.

[[accordion id="my-accordion"]
[accordion_item title="Product 1" parent_id="my-accordion" open="true"]Product 1 Content[/accordion_item]
[accordion_item title="Product 2" parent_id="my-accordion"]Product 2 Content[/accordion_item]
[accordion_item title="Product 3" parent_id="my-accordion"]Product 3 Content[/accordion_item]
[/accordion]]

Note: accordion id and accordion_item parent_id should be the same to make it work.

Hope that helps and let us know how it goes.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.