Free WordPress Tab Plugin for Block Editor Users

The WordPress Block Editor does not yet feature tabs. This Free WordPress Tab Plugin is lightweight and can be downloaded here.

A Free WordPress Tab Plugin

The WordPress Block Editor (Gutenberg) is incredibly flexible, yet a simple, native solution for creating organized content tabs is still conspicuously missing. Many plugins solve this by injecting heavy, proprietary frameworks, but the LDE Tabs Plugin takes a different, ultra-lightweight approach that leverages the editor’s core power. Unlike complex tab solutions, this Free WordPress Tab Plugin has a simple implementation: you only need to use the existing Advanced block settings. If you’ve ever been unsure about how to correctly set the HTML Anchor or Additional CSS Class(es), don’t worry—I will demonstrate, with clear screenshots below, exactly where to apply these two essential attributes on your content. This approach keeps the code lean, avoids unnecessary JavaScript bloat, and results in a highly organized, mobile-friendly interface.

Table of Contents

Tutorial Code For My Free WordPress Tab Plugin

Here is a cut down version of the plugin code for you to checkout. It doesn’t support multiple tabs on the same page or have a settings page or help but you can play around with it if you like. Just respect the GPL license.

Create the files lde-tabs-tut-plugin.php, lde-tabs-tut-plugin.css and lde-tabs-tut-plugin.js and copy them to a zip folder called lde-tabs-plugin.zip


Download & Install

You can build the tutorial version yourself by copying the code above and adding the files to a zip folder called lde-tabs-tut-plugin.zip or download the full version here.

Here’s the download link for v0.9.1:

It is also available on GitHub https://github.com/Les-Ey/lde-tabs-plugin

See Easy Guide to Installing a Custom WordPress Plugin


Using the Plugin

Before implementing your tabs, remember that you can easily customize the plugin’s appearance using the built-in settings panel.

Note: For the tutorial version, see usage and limitations in the lde-tabs-tut-plugin.php file header.

The colors for the active tab, hover states, content background, and the padding/margins for the content area can all be adjusted in the WordPress admin:

  • Go to Settings -> LDE Tabs.
  • There, you can use the color pickers to match the tabs perfectly to your theme. You also have a Reset to Plugin Defaults button if you want to undo your changes.

Implementing the LDE Tabs Plugin is a simple three-step process that relies entirely on using the native WordPress Block Editor.

Step 1: Insert the Tab Controller Shortcode

The first step is to add the shortcode that generates your clickable tab buttons.

  • Add a Shortcode Block wherever you want the tabs to appear.
  • Enter the shortcode using the basic format: [lde_tabs config="Label:ID, Label:ID"].
  • Optional: Use the group attribute if you have more than one independent set of tabs on the same page.
Shortcode AttributeWhen to Use It
config="Label:ID,..."Mandatory for defining tabs and linking to content.
group="unique-name"Optional (defaults to set1). Mandatory if you use a second tab set on the same page (e.g., use group="set2").

Example Shortcodes:

  • Single Set: [lde_tabs config="PHP:php-sec, CSS:css-sec, JS:js-sec"]
  • Second Set on Same Page: [lde_tabs group="set2" config="TabA:content-a, TabB:content-b"]

Step 2: Prepare the Tab Content Structure

You need a container for all the content belonging to a single tab. This block will be the target of the corresponding tab button.

  • Add a Block (e.g., Code Block, Paragraph, or a reusable Group Block if your content is complex) immediately below the shortcode.
  • Add all the content (text, code, images, etc.) you want for your first tab inside this single container block.
  • Crucial: This single outer block is the element you will be linking to.

his step is critical: You must apply two key attributes to your content block to link it back to the shortcode controller and allow the JavaScript to control its visibility.

  1. Select the Content Block: Ensure the block containing all your tab content is selected in the editor.
  2. Open Advanced Panel: Go to the right-hand Settings Sidebar and scroll down to expand the Advanced panel.
  3. Set the ID (HTML Anchor): In the HTML Anchor field, type the target ID exactly as you used it in the shortcode’s config (e.g., php-sec).
  4. Set the Class (Additional CSS class(es)): In the Additional CSS class(es) field, type the required class that the plugin’s CSS and JavaScript rely on: lde-tab-content.
Settings Sidebar FieldValue to Enter
HTML AnchorYour unique ID (e.g., php-sec)
Additional CSS class(es)lde-tab-content

Repeat and Publish

Repeat Step 2 and Step 3 for every tab you defined in your shortcode. Ensure each content block has the class lde-tab-content and a unique, matching HTML Anchor.

When you view the published page, the JavaScript will automatically initialize the tabs, hiding all content blocks except the first tab’s content in each group!

Conclusion

The LDE Tabs Plugin provides a lightweight and efficient solution for displaying organized, toggleable content within the WordPress Block Editor. It achieves this by focusing on native Gutenberg functionality: you simply connect your content—contained within Group Blocks—to the shortcode via the built-in HTML Anchor and Additional CSS Class(es) fields.

While the WordPress ecosystem offers many excellent solutions, both free and paid, I am hope this specific, efficient tool will remain completely free for the community. You are encouraged to download, use, and modify the code under the standard GPL license.

Thank you for reading, and happy coding!

Got Questions?

Support Les Ey on Buy Me a Coffee
Les Ey
Les Ey – Web Developer