Accordion Block Lite adds an accessible and responsive Accordion block to the block editor inserter that can be added to display list items that expand and collapse to show and hide their associated sections of content.
Ideal for condensing longform or complex content, such as Frequently Asked Questions (FAQ). Also useful for reducing page scrolling.
Upgrade to Pro at
https://troytempleman.com/wordpress/blocks/accordion-block/.
Features
- Accessible
- Responsive
- Inserter button for adding accordion items
- Settings
- Block alignment
- Text alignment
- Text formatting
- Header element
- Header icon [Pro]
- Header icon position [Pro]
- Styles
- Color
- Text
- Background
- Link
- Header text [Pro]
- Header text hover [Pro]
- Header text active [Pro]
- Header icon [Pro]
- Header icon hover [Pro]
- Header icon active [Pro]
- Header background [Pro]
- Header background hover [Pro]
- Header background active [Pro]
- Panel text [Pro]
- Panel background [Pro]
- Typography
- Font family
- Font size
- Appearance
- Line height
- Letter spacing
- Text decoration
- Letter case
- Dimensions
- Padding
- Margin
- Item padding [Pro]
- Item margin [Pro]
- Header icon width [Pro]
- Header padding [Pro]
- Header margin [Pro]
- Panel padding [Pro]
- Panel margin [Pro]
- Border
- Item border [Pro]
- Item border radius [Pro]
- Header border [Pro]
- Header border hover [Pro]
- Header border active [Pro]
- Header border radius [Pro]
- Panel border [Pro]
- Panel border radius [Pro]
- Variations [Pro]
- Lines [Pro]
- Blocks [Pro]
Demo
https://troytempleman.com/wordpress/blocks/accordion-block/
HTML
Accordion Block Lite will output an Accordion block with the following HTML structure:
Accordion Block Lite can be installed in one of the following four ways:
Automatic
To install with the built-in plugin installer:
- Login to your WordPress site at domain.com/wp-admin, where domain.com is the domain of your WordPress site.
- On the Dashboard page, in the left menu, click Plugins.
- On the Plugins page, click Add New Plugin.
- On the Add Plugins page, in the Search plugins... field, type Accordion Block Lite.
- In the Search Results, locate Accordion Block Lite, click Install Now and Activate.
Upload
To install with a .zip file:
- Login to your WordPress site at domain.com/wp-admin, where domain.com is the domain of your WordPress site.
- On the Dashboard page, in the left menu, click Plugins.
- On the Plugins page, click Add New Plugin.
- On the Add Plugins page, click Upload Plugin.
- Click Choose File, locate the .zip file and click Open.
- Click Install Now.
- On the Installing Plugin from uploaded file page, click Activate.
Manual
To install with a SFTP client:
- If you have a .zip file, unzip it with archiving software such as WinZip or Archive Utility.
- In a SFTP client such as WinSCP or FileZilla, connect to your WordPress site directory on your server.
- In the unzipped files, copy the accordion-block-lite folder and paste on your server, in your site’s wp-content/plugins folder.
- Login to your WordPress site at domain.com/wp-admin, where domain.com is the domain of your WordPress site.
- On the Dashboard page, in the left menu, click Plugins.
- On the Plugins page, locate Accordion Block Lite and click Activate.
Theme
To install in your theme instead of a plugin:
- If you have a .zip file, unzip it with archiving software such as WinZip or Archive Utility.
- In the unzipped files, copy the accordion-block-lite folder and paste in your site’s theme folder, such as wp-content/themes/your-theme/inc/accordion-block-lite/, where your-theme is your theme folder.
- In a code editor such as Visual Studio Code or Notepad++, open your theme's functions.php file.
- In your functions.php file, add the path from Step 2, such as require get_stylesheet_directory() . '/inc/accordion-block-lite/accordion-block-lite.php';.
- Save and close your functions.php file.
0.1.2 - September 22, 2024
- Updated: Version in
accordion-block-lite.php
and package.json
.
- Updated: Tags, stable tag and changelog in
readme.md
and readme.txt
.
- Updated: Version and keywords in
build/accordion/block.json
, build/accordion-item/block.json
, src/accordion/block.json
, and src/accordion-item/block.json
.
0.1.1 - April 2, 2024
- Added: Code to prevent direct file access in
build/accordion/render.php
, build/accordion-item/render.php
, src/accordion/render.php
, and src/accordion-item/render.php
.
- Added: Security improvement by adding
wp_kses_post
filter to $block_content
in build/accordion/render.php
, build/accordion-item/render.php
, src/accordion/render.php
, and src/accordion-item/render.php
.
- Updated: Version in
accordion-block-lite.php
and package.json
.
- Updated: Stable tag and changelog in
readme.md
and readme.txt
.
- Updated: Version in
build/accordion/block.json
, build/accordion-item/block.json
, src/accordion/block.json
, and src/accordion-item/block.json
.
0.1.0 - November 15, 2023