ralfhortt/query-loop-post-picker 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ralfhortt/query-loop-post-picker

Composer 安装命令:

composer require ralfhortt/query-loop-post-picker

包简介

A WordPress plugin that adds post selection and event date controls to Query blocks.

README 文档

README

Query Loop Post Picker adds editor controls for selecting specific posts and filtering event queries in the WordPress block editor.

Features

  • Select posts for a Query block with a searchable token field.
  • Preserve the selected post order with the Query block's include ordering.
  • Filter event queries by a quick date range or custom start dates.
  • Show only events related to the current staff member when editing staff templates.
  • Loads only in the block editor and uses WordPress core data and components.

Requirements

  • WordPress 6.1 or newer
  • PHP 8.1 or newer
  • The WordPress REST API must expose the selected post type.

Installation

  1. Download or clone this repository into wp-content/plugins/query-loop-post-picker.
  2. Run npm install and npm run build if the built assets are not included in your package.
  3. Activate Query Loop Post Picker from the WordPress Plugins screen.
  4. Add or edit a Query Loop block in the block editor.

The plugin does not add a frontend asset. Its controls are registered through enqueue_block_editor_assets.

Development

Install dependencies and build the editor script:

npm install
npm run build

For watch mode during development:

npm start

The generated files are written to build/.

Query Attributes

The picker writes these attributes to the Query block when applicable:

  • include and orderBy: "include" for selected posts.
  • eventDateRange for a predefined event date range.
  • eventStartAfter and eventStartBefore for custom event dates.
  • showRelatedEventsOfStaff for staff-related event queries.

The related-events option only appears for event queries in a staff context and is intended to be paired with a server-side query filter that handles this attribute.

License

GPL-2.0-or-later

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: TypeScript

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-07-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固