diff --git a/packages/edit-site/src/components/page-templates/dataviews-templates.js b/packages/edit-site/src/components/page-templates/dataviews-templates.js index 183d85ce40797b..0556efa5e63799 100644 --- a/packages/edit-site/src/components/page-templates/dataviews-templates.js +++ b/packages/edit-site/src/components/page-templates/dataviews-templates.js @@ -35,6 +35,7 @@ import { TEMPLATE_POST_TYPE, ENUMERATION_TYPE, OPERATOR_IN, + OPERATOR_NOT_IN, LAYOUT_GRID, LAYOUT_TABLE, } from '../../utils/constants'; @@ -266,6 +267,14 @@ export default function DataviewsTemplates() { filteredTemplates = filteredTemplates.filter( ( item ) => { return item.author_text === filter.value; } ); + } else if ( + filter.field === 'author' && + filter.operator === OPERATOR_NOT_IN && + !! filter.value + ) { + filteredTemplates = filteredTemplates.filter( ( item ) => { + return item.author_text !== filter.value; + } ); } } ); }