The v1 release extends GenerateBlocks® with new query types, enhancements to post queries, and dynamic tags. This allows you to do all kinds of things that required custom PHP before, like querying meta keys and values in Post Queries.
Term Query
- Query and display taxonomy terms using GenerateBlocks looper blocks
- Support for all public and private taxonomies
- Multi-taxonomy queries
- Includes new “Term Query” block variation to automatically set the query type on block insert.
- Parameters
- Taxonomies – Select one or more taxonomies to query
- Ordering – Order by name, slug, term ID, post count, parent, description, include order, or meta value
- Hide empty – Exclude terms with zero posts
- Include/Exclude – Filter specific terms by ID
- Search – Search terms by name
- Name like – Match terms containing a substring
- Hierarchy controls – Parent term, child of, childless only, pad counts
- Meta filtering – Filter by meta key/value with comparison operators
- Pagination – Per-page limits and offset support
User Query
- Query and display WordPress users using GenerateBlocks looper blocks
- Filter by role, meta, and published post status
- Includes new “User Query” block variation to automatically set the query type on block insert.
- Parameters
- Role filtering – Filter by user role(s)
- Ordering – Order by display name, username, email, registration date, post count, or meta value
- Include/Exclude – Filter specific users by ID
- Search – Search user data
- Has published posts – Only show users with content
- Meta filtering – Filter by user meta with comparison operators
- Pagination – Per-page limits and offset support
Post Query Enhancements
- Meta filtering – Filter posts by meta key/value with comparison operators and type casting
Dynamic Tags
term_title – Term name with optional archive link
term_description – Term description text
term_archive_url – Permalink to term archive
term_count – Number of posts in term
user_display_name – Display name with optional author archive link
user_email – User email address
user_bio – User biographical info
user_avatar_url – Avatar URL with customizable size and default style
user_url – User website URL
user_posts_url – Link to user’s posts archive
user_post_count – Number of published posts
Dynamic Tag Filters
fallback -Display a fallback string if the tag replacement is empty
url – Turns a media ID into a URL with an optional size param.
PHP Filters:
gb_query_enhancements_max_terms – Maximum term limit (default: 150)
gb_query_enhancements_max_users – Maximum user limit (default: 150)
gb_query_enhancements_term_query_args – Modify term query arguments
gb_query_enhancements_user_query_args – Modify user query arguments
gb_query_enhancements_term_response_data – Filter term REST response data
gb_query_enhancements_user_response_data – Filter user REST response data
REST API
- /gb-query-enhancements/get-term-query
- /gb-query-enhancements/get-user-query