diff --git a/core/server/models/post.js b/core/server/models/post.js index 2a8922e07d..fb19e7ed75 100644 --- a/core/server/models/post.js +++ b/core/server/models/post.js @@ -509,8 +509,12 @@ Post = ghostBookshelf.Model.extend({ } // If the current column settings allow it... if (!options.columns || (options.columns && options.columns.indexOf('primary_tag') > -1)) { - // ... attach a computed property of primary_tag which is the first tag or null - attrs.primary_tag = attrs.tags && attrs.tags.length > 0 ? attrs.tags[0] : null; + // ... attach a computed property of primary_tag which is the first tag if it is public, else null + if (attrs.tags && attrs.tags.length > 0 && attrs.tags[0].visibility === 'public') { + attrs.primary_tag = attrs.tags[0]; + } else { + attrs.primary_tag = null; + } } if (!options.columns || (options.columns && options.columns.indexOf('url') > -1)) {