Server-side paginated table in WordPress
A table whose pages are requested from the server (offset and limit), with an adjustable page size, navigation buttons and an announced “21–40 of 312” summary.
Here is an excerpt of this component's code in WordPress. The full code is free for members, ready to copy into your project.
This component also comes in
The code in WordPress
<!-- wp:html -->
<section class="tps" data-tps aria-labelledby="tps-titre">
<p class="tps-eyebrow">Atelier Brun · espace commerçant</p>
<h2 class="tps-title" id="tps-titre">Commandes</h2>
<p class="tps-summary" role="status" data-tps-summary>1–20 sur 312 commandes</p>
<div class="tps-scroll" data-tps-region>
<table class="tps-table">
<caption class="tps-sr">Commandes, de la plus récente à la plus ancienne</caption>
<thead>
<tr>
<th class="tps-head" scope="col">N°</th>
<th class="tps-head" scope="col">Client et état</th>(() => {
if (!document.querySelector(".tps")) return;
document.querySelectorAll("[data-tps]").forEach((root) => {
const on = (el, type, fn) => el.addEventListener(type, fn);
// Replace fetchPage with your API call, e.g. fetch(`/api/orders?offset=${offset}&limit=${limit}`); it returns { total, rows }.
const NAMES = [
"Camille Robert",
"Hugo Petit",
"Inès Garnier",
"Louis Fontaine",
"Manon Chevalier",
"Nathan Roux",:root {
--tps-card: #ffffff;
--tps-text: #1c1f26;
--tps-muted: #505767;
--tps-line: #e0e3ea;
--tps-accent: #4338ca;
--demo-tableau-pagination-serveur-bg: #ebecf2;
--demo-tableau-pagination-serveur-text: #1c1f26;
}
@media (prefers-color-scheme: dark) {
:root.forge-follows-system:not([data-theme="light"]) {<?php
/**
* Plugin Name: Forge, Tableau paginé côté serveur
* Description: Un tableau dont chaque page est demandée au serveur (offset et limite), avec taille de page réglable, boutons de navigation et résumé « 21–40 sur 312 » annoncé. Ajoute la composition « Tableau paginé côté serveur » à l'éditeur de blocs.
* Version: 1.0.0
* Requires at least: 6.6
* Requires PHP: 8.1
* Author: Forge
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: forge-tableau-pagination-serveur
*Free component: copy it freely, including for commercial projects.
Other data tables components in WordPress
Data tables components in WordPress
A documentation table showing where a kit or component has been tested (static HTML, WordPress, Elementor, Webflow, v0…), with status, last test date and a remark, filterable by status.
- Tailwind
- React
- CSS
- WordPress

A table of the towns and postcodes a tradesperson covers, with response time and travel fee, filtered by search and by zone.
- Tailwind
- React
- CSS
- WordPress

A timetable table sorted by column and filtered with level and free-place chips, whose rows each become a card on phones.
- Tailwind
- React
- CSS
- WordPress

A filterable table whose visible rows export in one click to a CSV file that opens cleanly in Excel or LibreOffice.
- Tailwind
- React
- CSS
- WordPress

A price table by service: one package to pick, options to tick, and the total with the estimated time recalculated on every click.
- Tailwind
- React
- CSS
- WordPress

A product spec sheet as two-column tables in native collapsible sections, with a button to open or close them all.
- Tailwind
- React
- CSS
- WordPress