From b85bcfe89d29481507a50582616dd169dbc5d951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Maneiro?= <583546+oandregal@users.noreply.github.com> Date: Thu, 7 Mar 2024 12:26:56 +0100 Subject: [PATCH] Fix templates & template parts custom filters --- .../src/components/page-templates-template-parts/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/edit-site/src/components/page-templates-template-parts/index.js b/packages/edit-site/src/components/page-templates-template-parts/index.js index 1462c5143a71dd..6410f3498283f9 100644 --- a/packages/edit-site/src/components/page-templates-template-parts/index.js +++ b/packages/edit-site/src/components/page-templates-template-parts/index.js @@ -382,7 +382,7 @@ export default function PageTemplatesTemplateParts( { postType } ) { !! filter.value ) { filteredData = filteredData.filter( ( item ) => { - return item.author_text === filter.value; + return filter.value.includes( item.author_text ); } ); } else if ( filter.field === 'author' && @@ -390,7 +390,7 @@ export default function PageTemplatesTemplateParts( { postType } ) { !! filter.value ) { filteredData = filteredData.filter( ( item ) => { - return item.author_text !== filter.value; + return ! filter.value.includes( item.author_text ); } ); } } );