{"id":2037,"date":"2026-10-14T04:31:47","date_gmt":"2026-10-14T04:31:47","guid":{"rendered":"https:\/\/shapekode.com\/product\/shapeblock\/?post_type=docs&#038;p=2037"},"modified":"2026-10-14T10:30:56","modified_gmt":"2026-10-14T10:30:56","password":"","slug":"accordion","status":"publish","type":"docs","link":"https:\/\/shapekode.com\/product\/shapeblock\/docs\/accordion\/","title":{"rendered":"Accordion"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The Accordion Block lets you display questions and answers in collapsible sections. Visitors can click a question to expand its answer, making it easier to organize FAQs and other content in a compact layout.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can customize the questions, answers, icons, spacing, colors, typography, borders, and other styling options to match your website design.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Add an Accordion Block<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Follow these steps to add and configure the Accordion Block in the Gutenberg editor.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Add the Accordion Block<\/h3>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Open a page or post in the WordPress Gutenberg editor.<\/li>\n\n\n\n<li>Click the <strong>+<\/strong> button to open the block inserter.<\/li>\n\n\n\n<li>Search for <strong>Accordion<\/strong> under ShapeBlock.<\/li>\n\n\n\n<li>Insert the Accordion Block into your page.<\/li>\n\n\n\n<li>Select the block to access its settings in the right-hand sidebar.<\/li>\n\n\n\n<li>Add or edit questions and answers using the Items panel.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1577\" height=\"546\" src=\"https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-14.png\" alt=\"\" class=\"wp-image-2211\" srcset=\"https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-14.png 1577w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-14-300x104.png 300w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-14-765x265.png 765w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-14-1024x355.png 1024w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-14-1536x532.png 1536w\" sizes=\"auto, (max-width: 1577px) 100vw, 1577px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Configure the Accordion Block<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Select the Accordion Block and open its settings in the right-hand sidebar. The available tabs are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Settings:<\/strong> Add and manage accordion items, configure the title tag and icons, and control the default opening behavior.<\/li>\n\n\n\n<li><strong>Layout:<\/strong> Configure the spacing between accordion items and the position of the accordion icons.<\/li>\n\n\n\n<li><strong>Style:<\/strong> Customize the appearance of accordion items, question titles, answers, and accordion icons.<\/li>\n\n\n\n<li><strong>Advanced:<\/strong> Configure the shared advanced settings available for ShapeBlock blocks.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Settings Tab<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the Settings tab to manage accordion items and configure the general behavior of the block.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Items<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the Items panel to create and manage questions and answers.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Question:<\/strong> Enter the question displayed in the accordion header.<\/li>\n\n\n\n<li><strong>Answer:<\/strong> Add the answer displayed when the question is expanded. Basic HTML, such as links and line breaks, is supported.<\/li>\n\n\n\n<li><strong>Open by Default:<\/strong> Choose whether an individual accordion item should be open by default.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Item Management Actions:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Move Up:<\/strong> Move an item higher in the list.<\/li>\n\n\n\n<li><strong>Move Down:<\/strong> Move an item lower in the list.<\/li>\n\n\n\n<li><strong>Duplicate:<\/strong> Create a copy of an existing item.<\/li>\n\n\n\n<li><strong>Remove:<\/strong> Delete an item from the accordion.<\/li>\n\n\n\n<li><strong>Add Item:<\/strong> Add a new question and answer.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1502\" height=\"728\" src=\"https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-15.png\" alt=\"\" class=\"wp-image-2213\" srcset=\"https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-15.png 1502w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-15-300x145.png 300w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-15-768x372.png 768w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-15-1024x496.png 1024w\" sizes=\"auto, (max-width: 1502px) 100vw, 1502px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">2. General<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the General panel to configure the accordion title tag, icons, and opening behavior.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Title HTML Tag:<\/strong> Choose the HTML tag used for question titles, including H1\u2013H6, div, span, or p.<\/li>\n\n\n\n<li><strong>Open Icon (expanded):<\/strong> Choose the icon displayed when an accordion item is expanded.<\/li>\n\n\n\n<li><strong>Close Icon (collapsed):<\/strong> Choose the icon displayed when an accordion item is collapsed.<\/li>\n\n\n\n<li><strong>Open All FAQs by Default:<\/strong> Keep all accordion answers open by default.<\/li>\n\n\n\n<li><strong>Enable Sticky:<\/strong> Enable sticky behavior for the accordion when Open All FAQs by Default is enabled.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1480\" height=\"466\" src=\"https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-16.png\" alt=\"\" class=\"wp-image-2215\" srcset=\"https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-16.png 1480w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-16-300x94.png 300w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-16-765x241.png 765w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-16-1024x322.png 1024w\" sizes=\"auto, (max-width: 1480px) 100vw, 1480px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Layout Tab<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the Layout tab to control the spacing between accordion items and the position of the accordion icons.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Spacing &amp; Position<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Items Space (gap px):<\/strong> Set the space between accordion items. Responsive settings are available for desktop, tablet, and mobile devices.<\/li>\n\n\n\n<li><strong>Icon Position:<\/strong> Choose whether the accordion icon appears on the right or left side of the question.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"259\" src=\"https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-17-1024x259.png\" alt=\"\" class=\"wp-image-2216\" srcset=\"https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-17-1024x259.png 1024w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-17-300x76.png 300w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-17-767x194.png 767w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-17.png 1482w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Style Tab<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the Style tab to customize the appearance of accordion items, question titles, answers, and accordion icons.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Items<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Customize the overall appearance of each accordion item.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Background:<\/strong> Set the item background color or gradient.<\/li>\n\n\n\n<li><strong>Border:<\/strong> Customize the item border width, color, and style.<\/li>\n\n\n\n<li><strong>Box Shadow:<\/strong> Add and customize a shadow around the item.<\/li>\n\n\n\n<li><strong>Border Radius:<\/strong> Set the radius of the item corners.<\/li>\n\n\n\n<li><strong>Item Padding:<\/strong> Adjust the inner spacing of each item. Responsive settings are available for desktop, tablet, and mobile devices.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The Background, Border, and Box Shadow controls support <strong>Normal, Hover, and Active<\/strong> states where applicable.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Title<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the Title panel to customize the appearance of accordion questions.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Typography:<\/strong> Customize the question typography, including responsive settings for desktop, tablet, and mobile devices.<\/li>\n\n\n\n<li><strong>Color:<\/strong> Set the question text color.<\/li>\n\n\n\n<li><strong>Question Background:<\/strong> Set the question background color or gradient.<\/li>\n\n\n\n<li><strong>Question Border:<\/strong> Customize the question border.<\/li>\n\n\n\n<li><strong>Question Box Shadow:<\/strong> Add a shadow to the question header.<\/li>\n\n\n\n<li><strong>Question Padding:<\/strong> Adjust the inner spacing around the question text. Responsive settings are available for desktop, tablet, and mobile devices.<\/li>\n\n\n\n<li><strong>Question Border Radius:<\/strong> Customize the corner radius of the question header.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The available question styling controls include <strong>Normal, Hover, and Active<\/strong> states.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Description<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the Description panel to customize the appearance of accordion answers.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Typography:<\/strong> Customize the answer typography, including responsive settings for desktop, tablet, and mobile devices.<\/li>\n\n\n\n<li><strong>Color:<\/strong> Set the answer text color.<\/li>\n\n\n\n<li><strong>Background:<\/strong> Set the answer background color or gradient.<\/li>\n\n\n\n<li><strong>Border:<\/strong> Customize the answer border.<\/li>\n\n\n\n<li><strong>Border Color:<\/strong> Set the answer border color for the Hover and Active states.<\/li>\n\n\n\n<li><strong>Border Radius:<\/strong> Customize the corner radius of the answer area.<\/li>\n\n\n\n<li><strong>Answer Padding:<\/strong> Adjust the inner spacing around the answer content. Responsive settings are available for desktop, tablet, and mobile devices.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The available answer styling controls include <strong>Normal, Hover, and Active<\/strong> states where applicable.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Accordion Icon<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the Accordion Icon panel to customize the appearance, size, and position of the accordion icons.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Color:<\/strong> Set the icon color.<\/li>\n\n\n\n<li><strong>Background:<\/strong> Set the icon background color or gradient.<\/li>\n\n\n\n<li><strong>Border:<\/strong> Customize the icon border.<\/li>\n\n\n\n<li><strong>Border Color:<\/strong> Set the icon border color for the Hover and Active states.<\/li>\n\n\n\n<li><strong>Vertical Position (px):<\/strong> Adjust the vertical position of the icon.<\/li>\n\n\n\n<li><strong>Icon Size (px):<\/strong> Set the icon size.<\/li>\n\n\n\n<li><strong>Box Size (px):<\/strong> Set the size of the icon container.<\/li>\n\n\n\n<li><strong>Border Radius:<\/strong> Customize the corner radius of the icon container.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The icon styling controls include <strong>Normal, Hover, and Active<\/strong> states where applicable.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1427\" height=\"760\" src=\"https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-18.png\" alt=\"\" class=\"wp-image-2217\" srcset=\"https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-18.png 1427w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-18-300x160.png 300w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-18-768x409.png 768w, https:\/\/shapekode.com\/product\/shapeblock\/wp-content\/uploads\/2026\/10\/image-18-1024x545.png 1024w\" sizes=\"auto, (max-width: 1427px) 100vw, 1427px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Advanced Tab<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Advanced tab provides additional spacing and background controls for the Accordion Block. These settings apply to the entire block, not to individual accordion items.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Spacing<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Padding:<\/strong> Set the inner spacing around the entire Accordion Block. Configure the top, right, bottom, and left values separately.<\/li>\n\n\n\n<li><strong>Margin:<\/strong> Set the outer spacing around the entire Accordion Block. Configure the top, right, bottom, and left values separately.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Both controls support responsive settings for desktop, tablet, and mobile devices.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#f3edec;padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px\"><strong>Note:<\/strong> These spacing controls apply to the entire block and are separate from the item, question, and answer spacing options in the Style tab.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Background<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Background:<\/strong> Customize the background of the entire Accordion Block using a background color or gradient.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#f3edec;padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px\"><strong>Note:<\/strong> This background applies to the block container, not to individual accordion items. To customize individual item backgrounds, use <strong>Style \u2192 Items<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Accordion Block lets you display questions and answers in collapsible sections. Visitors can click a question to expand its answer, making it easier to organize FAQs and other content in a compact layout. You can customize the questions, answers, icons, spacing, colors, typography, borders, and other styling options to match your website design. How [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[16],"doc_tag":[],"class_list":["post-2037","docs","type-docs","status-publish","hentry","doc_category-content-block"],"year_month":"2026-10","word_count":1004,"total_views":"15","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Sojib","author_nicename":"shapekode-admin","author_url":"https:\/\/shapekode.com\/product\/shapeblock\/author\/shapekode-admin\/"},"doc_category_info":[{"term_name":"Content Block","term_url":"https:\/\/shapekode.com\/product\/shapeblock\/docs-category\/content-block\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/shapekode.com\/product\/shapeblock\/wp-json\/wp\/v2\/docs\/2037","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shapekode.com\/product\/shapeblock\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/shapekode.com\/product\/shapeblock\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/shapekode.com\/product\/shapeblock\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shapekode.com\/product\/shapeblock\/wp-json\/wp\/v2\/comments?post=2037"}],"version-history":[{"count":0,"href":"https:\/\/shapekode.com\/product\/shapeblock\/wp-json\/wp\/v2\/docs\/2037\/revisions"}],"wp:attachment":[{"href":"https:\/\/shapekode.com\/product\/shapeblock\/wp-json\/wp\/v2\/media?parent=2037"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/shapekode.com\/product\/shapeblock\/wp-json\/wp\/v2\/doc_category?post=2037"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/shapekode.com\/product\/shapeblock\/wp-json\/wp\/v2\/doc_tag?post=2037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}