Accordion Blocks
Accordion Blocks is a simple plugin that adds a Gutenberg block for adding accordion drop-downs to your pages. The accordions should blend seamlessly with your theme. However, you may want to add custom styles to your theme. Features Adds a Gutenberg block for adding accordions to your site. Supports multiple accordions with individual settings for each accordion item. Fully responsive. Support for item IDs and direct links. Supports nesting accordions. Accessible (for users requiring tabbed keyboard navigation control). Optional Features Open individual accordion items by default. Disable auto closing of accordion items. Manually close items by clicking the title again. Scroll page to title when it’s clicked open (including setting a scroll offset position). Set the HTML heading tag for the title element (h1–h6, button). Set defaults to be applied to all new accordion items or reset a specific accordion item to the defaults. Supports adding custom block styles using wp.blocks.registerBlockStyle. Output The plugin will ultimately output following HTML (simplified for this example): Title with H2 tag Content Custom CSS You can use the following CSS classes to customize the look of the accordion. .c-accordion__item {} /* The accordion item container */ .c-accordion__item.is-open {} /* is-open is added to open accordion items */ .c-accordion__item.is-read {} /* is-read is added to accordion items that have been opened at least once */ .c-accordion__title {} /* An accordion item title */ .c-accordion__title--button {} /* An accordion item title that is using a ` ` tag */ .c-accordion__title:hover {} /* To modify the style when hovering over an accordion item title */ .c-accordion__title:focus {} /* To modify the style when an accordion item title currently has broswer focus */ .c-accordion__content {} /* An accordion item content container */
Top keywords
- accordion16×5.84%
- item12×4.38%
- title11×4.01%
- accordion item8×2.92%
- c-accordion8×2.92%
- items6×2.19%
- accordion items5×1.82%
- accordion item title4×1.46%
- accordions4×1.46%
- item title4×1.46%
- adding3×1.09%
- block3×1.09%
MakeITeasy Popup
Need popups to grab your users’ attention? Marketing call-to-actions that open on scroll, timer, click, matched referer, hover, or exit intent? Multiple popups on one page? This plugin has it all. It provides styling consistent with core block editor blocks plus additional features. Why choose Makeiteasy Popup? ▶️ Unlike some other plugins, Makeiteasy Popup integrates seamlessly with WordPress, feeling like a native, built-in WP block. It’s lightweight and self-sufficient, without the heavy burden of a large blocks library. It relies on a single tiny dependency – micromodal.js – with a combined total of only 10 kB of JavaScript❕ 👆 Try demo – there is a “Live preview” button on the top of this page 👆 ❗ Sometimes “Live preview” does not start due to slower responds of servers with resources. If progress stops with black screen or progress indicator does not advance anymore (loading should be finished at max 30 seconds) – in that case please refresh the page in browser. Key Features 🥇 Feature-Rich and free. 🥈 Fully Open Source: Including the block source code. Fork and adjust as needed. 🥉 Developer friendly: Hooks for modifications and unopinionated starting CSS. ⏲️ Future-Proof Compatibility: Guaranteed compatibility with future WordPress versions. 🆕 Added “open on exit intent” feature. It works only on desktop. When popup is set up to open on exit intent and user moves mouse outside the top border of the browser inner window (screen), popup appears. User can choose when feature is activated (after how many seconds since page was loaded), so popup can’t open too early. ⏱️❗Queue if another popup is opened, popup is placed in queue and opened upon closing the former. Known limitations Currently, opening several modal popups simultaneously is impossible due to the limitations of the Micromodal.js library. Future versions will replace this library with the native Dialog HTML element, including automatic migration for existing popups. Block options The block sidebar provides many options, most of which function similarly to other blocks. Notable options include: – Opening time selector: See the detailed section below. – Layout type: Floating, Fixed, Attached – Popup Enabled: Temporarily hide the popup without deleting it. – Open on interval: Open on given interval in days. – Open on matching referer: Open if the user’s referral URL matches. Layout Types Floating: popup floats above content. Clicking on area outside popup closes it. Fixed: popup is “fixed” to one of sides of screen — top, bottom, right, left Attached: popup is attached to element on screen. When user scrolls, it moves with it. Modality Modal: popup blocks everything else on screen, scrolling is not possible, popup can be closed by clicking outside of popup Modeless: popup is non-blocking, user can scroll, popup can’t be closed by clicking outside of popup Developers Github repository https://github.com/Lovor01/makeiteasy-popup Changing the Close button Using Javascript: import { ReactComponent as CloseIcon } from '../assets/close-x.svg'; addFilter( 'makeiteasy-closeButtonIcon', 'makeiteasy/makeiteasy-popup/close-icon', () => ( ) ); If you customize button this way and you already have posts(or pages) with popup block, on post reopening the message “This block contains unexpected or invalid content.” will be presented. In such case choose “Attempt to repair block” and if it looks good, save post. Using PHP: add_action( 'render_block_makeiteasy/popup', function($content) { $svg = file_get_contents( __DIR__ . '/path_to_file/close-button-dark.svg' ); return preg_replace( '~( ).*( )~m', "$1$svg$2", $content ); } ); Attaching Code to Modal Events Custom events ‘makeiteasy/openModal’ and ‘makeiteasy/closeModal’ are fired on modal open and close. Events fire on modal itself, DOM element with class .wp-block-makeiteasy-popup.