We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ad05ca8 + e295086 commit 31ec7e6Copy full SHA for 31ec7e6
packages/query-include-exclude/query-include-exclude.php
@@ -28,3 +28,16 @@ function () {
28
);
29
}
30
31
+
32
+add_filter(
33
+ 'query_loop_block_query_vars',
34
+ function ( array $query, \WP_Block $block ): array {
35
+ $block_query = $block->context['query'] ?? array();
36
+ if ( ! empty( $block_query['include'] ) ) {
37
+ $query['post__in'] = array_map( 'intval', $block_query['include'] );
38
+ }
39
+ return $query;
40
+ },
41
+ 10,
42
+ 2
43
+);
0 commit comments