/table-block-enhancer

Adds filtering and sorting functionality to the default WordPress Table block.

Primary LanguagePHPGNU General Public License v2.0GPL-2.0

Table Block Enhancer

Table Block Enhancer is a WordPress® plugin that adds powerful features to the default WordPress® Table block.

Enhance your tables with sorting, searching, and paging capabilities using the popular DataTables library.

Features

  • Per-Block Control: Enable or disable paging, searching, and ordering for each table individually.
  • Easy Integration: Seamlessly integrates with the core Table block in the Gutenberg editor.
  • No Coding Required: Configure settings directly within the block editor without touching any code.
  • Lightweight and Fast: Optimized for performance with minimal impact on page load times.

Installation

From the WordPress® Dashboard

  1. Download the plugin ZIP file from the GitHub repository.
  2. In your WordPress® dashboard, navigate to Plugins » Add New.
  3. Click on Upload Plugin at the top of the page.
  4. Choose the downloaded ZIP file and click Install Now.
  5. After installation, click Activate Plugin.

Manual Installation

  1. Upload the table-block-enhancer folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress®.

Usage

Adding a Table with Enhanced Features

  1. In the WordPress® editor, add a new Table block.
  2. Enter your table data as you normally would.
  3. With the Table block selected, open the block settings sidebar.
  4. Under Table Enhancer Settings, you'll find toggles for:
    • Enable Paging
    • Enable Searching
    • Enable Ordering
  5. Toggle the features on or off according to your needs.
  6. Publish or update your post/page.

Features Explained

  • Paging: Breaks the table into pages, displaying a set number of rows at a time.
  • Searching: Adds a search box above the table, allowing users to search through table data.
  • Ordering: Enables clickable column headers to sort the table data ascending or descending.

Frequently Asked Questions

Does this plugin work with other table plugins?

No, Table Block Enhancer is designed specifically to enhance the core WordPress® Table block.

Can I customize the styling of the tables?

Yes, you can add custom CSS to style the tables as desired. The plugin uses standard DataTables classes.

Is JavaScript required for this plugin to work?

Yes, the plugin relies on JavaScript to provide the enhanced functionality via the DataTables library.