From 6b4694719f5cee84740458c022debfa41c97ab2a Mon Sep 17 00:00:00 2001 From: "Eduardo I. Iriarte Gahete" Date: Fri, 23 Nov 2018 13:22:18 +0100 Subject: [PATCH] Latest Posts: typo in wp_get_recent_posts argument name Wrong argument name broke the "filter by category" functionality in the "Latest Posts" block. --- packages/block-library/src/latest-posts/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/latest-posts/index.php b/packages/block-library/src/latest-posts/index.php index 72b395a06cf48..5ca175d843865 100644 --- a/packages/block-library/src/latest-posts/index.php +++ b/packages/block-library/src/latest-posts/index.php @@ -21,7 +21,7 @@ function render_block_core_latest_posts( $attributes ) { ); if ( isset( $attributes['categories'] ) ) { - $args['categories'] = $attributes['categories']; + $args['category'] = $attributes['categories']; } $recent_posts = wp_get_recent_posts( $args );