Lightweight Accordion
Lightweight Accordion plugin for WordPress allows you to add collapse elements to posts using a Gutenberg block or a shortcode (via classic editor). By using the details HTML tag and a few lines of CSS this allows for a javascript-free accordion for minimum page load. Extremely Lightweight (<1kb): Without using Javascript the plugin uses the native details HTML tag and a few lines of code for almost no impact on front-end. Customizable: Options include customizing the HTML tag used for the accordion title, open by default, borders, colors, and accordion grouping (auto-close others when one opens). Shortcode Usage examples Here are a few examples of using the accordion plugin with shortcodes. [lightweight-accordion title="My Accordion"]My Content[/lightweight-accordion] Additionally you can display the accordion open on load with the accordion_open option. [lightweight-accordion title="My Accordion" accordion_open=true]My Content[/lightweight-accordion] You can also change the html tag wrapping the title of the accordion using the title_tag option. [lightweight-accordion title="My Accordion" title_tag="h3"]My Content[/lightweight-accordion] If you want to include FAQ schema you can add the schema option and set it to faq. [lightweight-accordion title="What is your return policy?" schema="faq"]You have 1 week to return your items[/lightweight-accordion] If you’d like put a border around the content of the accordion you can use the “bordered” attribute. [lightweight-accordion title="Bordered Content" bordered=true]My Content[/lightweight-accordion] If you want accordions to auto-close when another opens (exclusive accordion), use the “group” attribute with the same value on each accordion. [lightweight-accordion title="Question 1" group="faq"]Answer 1[/lightweight-accordion] [lightweight-accordion title="Question 2" group="faq"]Answer 2[/lightweight-accordion] [lightweight-accordion title="Question 3" group="faq"]Answer 3[/lightweight-accordion] If you’d like to swap the default triangle marker for a chevron or plus/minus icon (optionally on the right side of the title) use the “icon” and “icon_position” attributes. [lightweight-accordion title="My Accordion" icon="chevron" icon_position="right"]My Content[/lightweight-accordion] Shortcode Options Here is the full listing of shortcode options. Additionally all of these options are accessible when using the Gutenberg block. title (Required Default: null) The title of your accordion will be displayed at the top for users to click. A good example would be to include a user’s question so they could click it for more details. content (Required Default: null) Content that will go into your accordion element. title_tag (Default: “span”) This sets the html tag that wraps the title in the accordion summary. Useful if you want to make it a heading tag for SEO purposes. accordion_open (Default: false) Set this to true if you want your accordion to be open by default. bordered (Default: false) Set this to true if you want a border around the accordion content. title_text_color (Default: false) Set this to a hex value or CSS color to change the color of the accordion title text. title_background_color (Default: false) Set this to a hex value or CSS color to change the color of the accordion title text. schema (Default: false) Set this to faq if you’d like FAQ schema to be included. class (Default: false) Used to add a custom class to the parent container of the accordion. anchor (Default: null) Adds the value as an ID to the accordion div as an anchor. autop (Default: true) By default the shortcode will wrap text in a ‘p’ tag. Set this to false if you’d like this disabled for the specific accordion. group (Default: false) Set this to a group name to make accordions with the same group auto-close when another opens. Uses the native HTML details name attribute for zero JavaScript overhead. icon (Default: false) Set this to “chevron”, “plus”, or “none” to replace the default triangle marker. The chevron rotates and the plus becomes a minus when the accordion opens. icon_position (Default: false) Set this to “right” to display the chevron or plus icon on the right side of the accordion title. Additional Details If you’d like to remove the “lightweight-accordion.css” from being enqueued on your site use the filter below. It’s recommend you style the accordion yourself if you use this filter. add_filter('lightweight_accordion_include_frontend_stylesheet', '__return_false' ); If you’d like to remove the “lightweight-accordion/editor-styles.css” from being enqueued in the admin area of your site you can use the filter below. add_filter('lightweight_accordion_include_admin_stylesheet', '__return_false' ); If you’d like to remove processing of shortcodes in accordion content you can use this filter. add_filter('lightweight_accordion_process_shortcodes', '__return_false' ); If you’d like to use inline Microdata for FAQ schema you can use this filter. (Not recommended) add_filter('lightweight_accordion_output_microdata', '__return_true' ); If you’d like to force “lightweight-accordion.css” to load on all of your site you can use this filter. By default the plugin will detect if the block or shortcode is used and enqueue the CSS. add_filter('lightweight_accordion_always_include_frontend_stylesheet', '__return_true' ); When a page contains an accordion a tiny inline script is added to the footer that automatically opens accordions targeted by a URL hash (for example a link to an accordion’s anchor). If you’d like to disable this you can use the filter below. add_filter('lightweight_accordion_anchor_script', '__return_false' );
Top keywords
- accordion39×4.31%
- title23×2.54%
- lightweight-accordion21×2.32%
- default20×2.21%
- filter13×1.44%
- content11×1.22%
- false10×1.11%
- set10×1.11%
- tag10×1.11%
- add9×1.00%
- default false9×1.00%
- faq9×1.00%
WPMozo Blocks and Addons
WPMozo Blocks and Addons is a plugin designed to extend the functionality of the Gutenberg editor. It provides a variety of blocks to help you create stunning and interactive content in WordPress effortlessly. View Demo Key Features: Price List Display pricing elegantly on your website with the Price List Block. Text Highlighter Highlight important text using the Text Highlighter block. Bar Counter Highlight progress or achievements with bar counters, allowing you to showcase statistics or milestones effectively on your WordPress site. Promotion Bar Highlight announcements, offers, or seasonal deals with the WPMozo Promotion Bar block. Perfect for grabbing user attention and boosting conversions. Lottie Show interactive animations with customizable controls, triggers, and responsiveness using the Lottie Block. Text Animator Animate your text with various effects to grab attention using the Text Animator Block. Scroll Image Showcase images with a smooth scrolling effect using the Scroll Image Block. Image Magnifier Enable users to zoom in on images for a closer look, enhancing the viewing experience for visuals on your WordPress website. Masonry Gallery Craft beautiful masonry galleries with the WPMozo Blocks and Addons, offering intuitive features without the need for CSS. Customize number of columns, lightbox functionality, optimized image gaps, and enhanced visibility for an appealing showcase. Mystery Image Show one random image from a number of images on you WordPress website whenever the page is refreshed using the WPMozo Mystery Image block. Testimonial Slider Show testimonials with amazing sliders on your WordPress website in style and make an impression on you users with the Testimonial Slider Block. Image Stack Display images or icons side by side with the Image Stack block. This lightweight block adds hover effects, tooltips, and full customization for size, spacing, alignment, and colors—making your image stack interactive and engaging. Pricing Table Build organized and customizable pricing tables on your WordPress site with the Pricing Table block. Add headings, subtitles, icons or images, pricing period, multiple items, and a CTA with ease. Star Rating Add star ratings to your WordPress site with Star Rating block. Showcase a review title, image, and content in one complete block, optimized with Star-rating Schema for rich snippets in search results—helping you attract more traffic. Image Card The Image Card block lets you showcase images with a title, icon, and CTA. Simple to use, fully customizable, and designed to boost engagement with creative freedom. Before After Slider Create stunning before-and-after comparisons with a sleek, responsive slider. Perfect for showcasing transformations, this WordPress before-and-after slider is ideal for websites using Gutenberg. Easily compare images side by side with smooth transitions, making it a must-have for portfolios, product showcases, and more. Fully customizable for any theme. Content Toggle Organize content with collapsible sections using the Content Toggle block. Ideal for FAQs, product details, or lengthy content, this feature enhances readability and user experience. Fancy Heading Craft visually striking headings with the Fancy Heading block. Combine pre-headings, main headings, and sub-headings using custom fonts, vibrant colors, and animation effects. Perfect for creating bold section titles that draw attention and elevate your content presentation. Fancy Text Add engaging animated text with the Fancy Text block. Create typewriter effects, text transitions, and gradient highlights to bring dynamic flair to your content. Ideal for call-to-actions, hero sections, or key messages that need to stand out. Flip Box Add interactive, double-sided boxes with the Flip Box block. Showcase content or images on both sides with a smooth flip animation. Great for portfolios, service highlights, team member cards, or promotional sections with visual appeal. Floating Image Make images come alive with subtle floating animations. The Floating Image block adds motion effects that capture attention and bring a modern, interactive feel to your visuals—perfect for creative and tech-forward sites. Interactive Image Card Display images with interactive overlays, hover effects, and call-to-action buttons using the Interactive Image Card block. Ideal for showcasing products, projects, or team members with engaging and clickable visuals. List Design beautiful and customizable lists with icons, numbers, or symbols using the List block. With advanced styling options, it’s perfect for feature lists, step-by-step guides, or comparisons that match your brand’s design. Logo Slider Showcase brand partners, clients, or sponsors with the responsive Logo Slider block. Smooth transitions, autoplay options, and full styling control make it a perfect addition to testimonial sections or partner pages. Separator Add elegant visual dividers between sections with the Separator block. Choose from lines, icons, or custom shapes to enhance layout clarity and create a professional design flow. Tilt Image Add 3D tilt effects to your images for a subtle yet interactive user experience. The Tilt Image block enhances visual depth and engagement, making it great for modern design portfolios or creative websites. Advanced Button Add enhanced functionality and styling options to buttons, including hover effects, animations, and customization with Advanced Button widget. Rotating Text Highlight key words or phrases with smooth rotating effects using the WPMozo Rotating Text block for perfect for drawing attention and boosting engagement. Business Hours Showcase your business’s opening hours clearly and attractively with the Business Hours Block. This block lets you display dates, weekday names, and customize the design to keep your visitors informed and engaged. Dropdown Button Display hidden links or content in a compact and user-friendly way with the WPMozo Dropdown Button block, perfect for navigation menus, quick actions, or additional options without cluttering the layout. Scroll Text Add animated scrolling text to your WordPress site with the WPMozo Scroll Text block for perfect for highlighting important messages with smooth scroll effects. Image Hover Effect Add stylish visual appeal to your website with interactive hover animations using the WPMozo Image Hover Effect block, ideal for highlighting images with elegant effects and smooth transitions. Image Accordion Display content on your images with elegant accordion image sliders – vertical and horizontal ones. It enables you to turn simple images into stylish one and show content on them when users hover or click on them. Facebook Embedded Video Embed Facebook videos directly into your website with customizable controls and responsive design using the Facebook Embedded Video Block. Facebook Like Add a Facebook Like button to your website, allowing users to like your content directly from your page. Facebook Share Integrate Facebook Comments into your website with the Facebook Comments Block enabling users to comment on your content using their Facebook accounts. Facebook Comments Integrate Facebook Comments into your website with the Facebook Comments block enabling users to comment on your content using their Facebook accounts. Twitter Embedded Tweet Embed your Tweets an show than on your wibsite pages with a number of customization options with the Twitter Embedded Tweet Block. Twitter Share Button Make users share post on their accounts containing your content right from your website page with the Twitter Share Button Block. Twitter Follow Button Use the Twitter Follow Button Block to make users follow you on your twitter account right from your website page. Image Card Ticker The Image Card Ticker block is perfect for showcasing brand logos, event snapshots, or any image-based content in a continuous scrolling format. Background Switcher Display content on your WordPress website with various background in a single block be it image, color or gradient using the WPMozo Background Switcher block. Scrolling Zoom Gallery WPMozo Background Switcher Block adds an engaging way to showcase content by changing background images based on user interaction. Blog Timeline Showcase your blogs in a stylish and user friendly timline and make your WordPress website stunning with the Blog Timeline Block. Advanced Tooltip Enhance user interaction on your website with dynamic hover content using WPMozo Advanced Tooltip block for Gutenberg, perfect for showcasing extra information in a sleek and modern way. Horizontal Scrolling Posts Showcase your blog posts in a unique horizontal layout using WPMozo Horizontal Scrolling Posts block for Gutenberg. Team Slider Showcase team members or staff in an amazing slider using WPMozo Team Slider block for Gutenberg, Perfect for introducing your team or personnel on your website. Scroll Stack Cards Add movement and storytelling to your website using WPMozo Scroll Stack Cards block for Gutenberg. Hover List Create interactive list sections with a title, subtitle, description, icon, and button. On hover, each row displays a background image using WPMozo Hover List block for Gutenberg. Split Image WPMozo Split Image block breaks an image into a customizable grid of square pieces, allowing unique and artistic presentations for your site. Breadcrumbs WPMozo Breadcrumbs block enables both users and search crawlers to easily explore different pages of the site. Posts Ticker WPMozo Posts Ticker block displays dynamic post titles in a fully customizable ticker bar, making it ideal for highlighting the latest news, updates, or featured blog posts. Wavy Gallery WPMozo Wavy Gallery block adds a unique horizontal wave animation to your image gallery, perfect for showcasing portfolios, creative projects, and visual stories. Call To Action WPMozo Call To Action block adds a custom title, description and button.. This plugin is fully compatible with Gutenberg and WordPress block editor, ensuring seamless integration with your website. Related Plugins WPMozo Product Grid for WooCommerce – Gutenberg block plugin to display WooCommerce products grid. WPMozo Product Carousel for WooCommerce – Gutenberg block plugin to display WooCommerce products carousel. WPMozo Addons Lite for Elementor – 30+ widgets for Elementor page builder. Third Party Code Credits Images Loaded File Location: assets/js/imagesLoaded/imagesloaded.pkgd.js License: MIT License URI: https://desandro.mit-license.org/ Event Move File Location: assets/js/jqueryEventMove/jquery_event_move.js License: WTFPL License URI: https://plugins.jquery.com/event.move/ http://www.wtfpl.net/txt/copying/ Twenty Twenty File Location: assets/js/jqueryTwentyTwenty/jquery_twentytwenty.js File Location: assets/css/twentytwenty/twentytwenty.css License: ISC License License URI: https://www.isc.org/licenses/ Swiper File Location: assets/js/swiper/swiper-bundle.js File Location: assets/css/swiper/swiper-bundle.css License: MIT License URI: https://opensource.org/licenses/MIT Tilt js File Location: assets/js/tilt/tilt-jquery.js License: MIT License URI: https://opensource.org/licenses/MIT Documentation and Support For detailed usage instructions, check out the plugin documentation. Need help or have questions? Visit the plugin support forum. Like our Plugin? Do you like our plugin? – Connect with us on Facebook! – Follow us on Twitter! – Join our YouTube channel. – Rate us on WordPress.