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%
SiteOrigin Widgets Bundle
The SiteOrigin Widgets Bundle gives you all the elements you need to build modern, responsive, and engaging website pages. Using the Widgets Bundle, you can quickly and effortlessly add buttons, sliders, heroes, maps, images, carousels, features, icons, and so much more. SiteOrigin Widgets are ready to be used anywhere, in Page Builder by SiteOrigin, in the Block Editor or your theme’s widget areas. The Widgets Bundle is even compatible with other popular page-building plugins. Our collection is growing, and here are some of the powerful widgets included so far: Accordion Efficiently display content in expandable sections, maximizing space for improved organization. Anything Carousel Display images, text, or any content in a highly customizable and responsive carousel slider. Author Box Display author information, including avatar, name, bio, and post links in a customizable box. Blog Showcase blog content in personalized list or grid layouts with flexible design and display settings. Button Create a custom button with flexible styling, icon support, and click tracking functionality. Button Grid Add multiple buttons in one go, customize individually, and present them in a neat grid layout. Contact Form Add a contact form with custom fields, design options, spam protection, and email notifications. Call To Action Prompt visitors to take action with a customizable title, subtitle, button, and design settings. Editor Insert and customize content with a rich text editor offering extensive formatting options. Features Showcase features with icons, titles, text, and links in a customizable grid layout. Google Maps Embed a customizable Google Map with markers, directions, styling options, and interactive elements. Headline Engage visitors with a prominent, stylish headline and optional divider and sub-headline to convey key messages. Hero Image Build an impressive hero image section with custom content, buttons, background image, color, and video. Icon Display a customizable icon with color, size, alignment, and optional link settings. Image Add a responsive image with custom dimensions, positioning, caption, link, and styling options. Image Grid Showcase images in a responsive grid layout with custom size, spacing, alignment, and captions. Image Slider Create a responsive slider with customizable image and video frames, navigation, and appearance settings. Layout Slider Design responsive slider frames with unique layouts, backgrounds, and content built with Page Builder. Lottie Player Bring your content to life using interactive Lottie animations with personalized settings and links. Post Carousel Display blog posts or custom post types in a responsive, customizable carousel layout. Price Table Display pricing plans in a professional table format with custom columns, features, and design. Recent Posts Drive traffic to your latest content with a visually appealing, fully customizable recent posts showcase. Simple Masonry Layout Display images in an attractive masonry grid with adjustable columns, gutters, and optional captions. Social Media Buttons Add social media buttons to your site with personalized icons, colors, and design settings. Tabs Create tabbed content panels with customizable titles, content, initial tab, and design settings. Taxonomy Automatically display the taxonomies of the current post with customizable labels, colors, and link settings. Testimonials Feature testimonials from satisfied customers with tailored layouts, images, text, colors, and mobile compatibility. Video Player Embed self-hosted or externally hosted videos with a customizable player, controls, and responsive sizing. Ready to Be Used Anywhere Page Builder by SiteOrigin: Insert widgets in Page Builder by SiteOrigin in either the Classic Editor or Page Builder Layout Block in the Block Editor. Block Editor: The Widgets Bundle is 100% Block Editor compatible. Insert widgets using the SiteOrigin Widgets Block featuring a live widget search form. Theme and Plugin Widget Areas: Insert widgets in any theme or plugin widget area. In Other Popular Page Builder Plugins: Insert widgets in Elementor or Beaver Builder. Built for Speed We carefully built each widget for the best possible page size and load time. The Widgets Bundle is perfectly compatible with Autoptimize and all other major performance plugins. SEO Optimized The Widgets Bundle uses modern SEO best practices and seamlessly integrates with all major SEO plugins. Accessibility Ready The Widgets Bundle is accessibility-ready. Tab through all form fields and settings, make changes without using a mouse. Actively Developed SiteOrigin has been creating magical tools for your WordPress website since 2011. We actively develop the Widgets Bundle with updates released several times a month, including new features and fixes as required. View our Widgets Bundle work on GitHub. Create Custom Widgets Access a huge array of features and save time by developing custom widgets for your theme or plugin on the Widgets Bundle Framework. Read more in our extensive developer documentation. Documentation Documentation is available on SiteOrigin. Support Free support is available on the SiteOrigin support forums. SiteOrigin Premium SiteOrigin Premium enhances the Widgets Bundle with a vast array of additional features and settings. Take your layouts to the next level with SiteOrigin Premium addons. SiteOrigin Premium includes access to our professional email support service, perfect for those times when you need fast and effective technical support. We’re standing by to assist you in any way we can.