humanmade/post-template-table
最新稳定版本:1.0.5
Composer 安装命令:
composer require humanmade/post-template-table
包简介
A post template like block to output posts as a table
README 文档
README
A WordPress block plugin that provides a table-based alternative to the core/post-template block for displaying query results.
Features
- Table Layout: Display query loop posts in a structured table format
- Sortable Columns: Reorder columns using up/down arrows in the sidebar
- Editable Headers: Customize column header labels
- Toggle Headers: Option to show/hide the header row
- Core Block Support: Works with standard WordPress post blocks:
core/post-titlecore/post-datecore/post-excerptcore/post-featured-imagecore/post-termscore/post-authorcore/post-author-namecore/post-author-biographycore/avatar
Installation
- Copy this plugin folder to your WordPress
wp-content/plugins/directory - Navigate to the plugin directory:
cd wp-content/plugins/hm-post-template-table - Install dependencies:
npm install - Build the plugin:
npm run build - Activate the plugin in WordPress admin
Usage
- Add a Query Loop block to your page/post
- Inside the Query Loop, add the Post Template Table block
- Add post blocks (e.g., Post Title, Post Date) as children to create columns
- Customize column headers in the block sidebar
- Reorder columns using the up/down arrows
- Toggle the header row visibility if needed
Development
Build Commands
npm run start- Start development mode with hot reloadnpm run build- Build production-ready assetsnpm run lint:js- Lint JavaScript filesnpm run lint:css- Lint CSS/SCSS filesnpm run format- Format code using WordPress standards
Block Structure
The block must be used as a child of core/query (Query Loop block). It renders a table where:
- Each inner block becomes a column
- Each post in the query becomes a row
- Headers are customizable via block attributes
Requirements
- WordPress 6.0 or higher
- PHP 7.4 or higher
- Node.js for development
License
GPL-2.0-or-later
统计信息
- 总下载量: 324
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2025-10-09