diff --git a/core/server/models/plugins/include-count.js b/core/server/models/plugins/include-count.js index 7535c1fe60..5d62241977 100644 --- a/core/server/models/plugins/include-count.js +++ b/core/server/models/plugins/include-count.js @@ -19,7 +19,7 @@ module.exports = function (Bookshelf) { if (options.context && options.context.public) { // @TODO use the filter behavior for posts - qb.andWhere('posts.page', '=', false); + qb.andWhere('posts.type', '=', 'post'); qb.andWhere('posts.status', '=', 'published'); } }); @@ -36,7 +36,7 @@ module.exports = function (Bookshelf) { if (options.context && options.context.public) { // @TODO use the filter behavior for posts - qb.andWhere('posts.page', '=', false); + qb.andWhere('posts.type', '=', 'post'); qb.andWhere('posts.status', '=', 'published'); } });