https://github.com/imath/wp-query-block-attributes
Introduce a new WP_Query parameter to run block attributes queries.
https://github.com/imath/wp-query-block-attributes
wordpress-plugin
Last synced: 4 months ago
JSON representation
Introduce a new WP_Query parameter to run block attributes queries.
- Host: GitHub
- URL: https://github.com/imath/wp-query-block-attributes
- Owner: imath
- Archived: true
- Created: 2020-02-02T20:34:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-21T18:37:22.000Z (5 months ago)
- Last Synced: 2025-02-21T19:34:53.690Z (5 months ago)
- Topics: wordpress-plugin
- Language: PHP
- Size: 1010 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WP Query Block Attributes
**This WP Plugin is no more maintained and is now archived**
Introduce a new WP_Query parameter to run block attributes queries. Here's an example of use:
```php
$q = new WP_Query();
$items = $q->query(
array(
'post_type' => 'post',
array(
'block_attribute_query' => array(
array(
'block' => 'wpqba/block', // Name of the WP Block.
'attribute' => 'wpqbaAttributeOne', // Name of the WP Block attribute.
'value' => 'One', // Value to find.
'type' => 'string', // Type for the value (string or integer).
),
),
,)
)
);
```