Admin posts filter: do not have tags

Because Ghost puts all posts under Posts, though you can make collections, they all end up under Posts.

I have a few categories that must be considered posts, but I do not consider them “real articles” — examples being poetry, short notes, etc, which I filter out in the theme’s main listing.

Because of this, being able to filter “all posts except these tags” becomes important. I think this is a use case others with quite custom set-ups will also find important.

I seem to be able to do this to exclude a single tag:

posts?tag=-notthistag&type=published

And then I can save this as a view, even though the UI doesn’t recognise what the filter is, it works.

I need to exclude multiple tags, eg:

posts?tag=-notthistag1,-notthistag2,-notthistag3&type=published

This doesn’t work, and neither does separating with & instead of , or doing multiple like:

posts?tag=-notthistag1&tag=-notthistag2&tag=-notthistag3&type=published

Is there a valid filter syntax to do this through the admin URLs?

Also even if there is, my suggestion would be to incorporate a “NOT” syntax into the admin’s UI. It might seem obscure, but it’s really useful in valid real world use cases. Basically this makes it impossible in my case to create a view where I can quickly browse “full posts” and make metadata updates to them (to review and assign tags, for example).

Thanks for your consideration.

I would say thats the point of routes and channels and setting up your data where you want it. which theme are you running as I know @Cathy_Sarisky says Source is not as easy to manipulate the front posts.

1 Like

I agree! Some more filter options in the admin ui would be really useful. You might make an ideas topic about it? Edit: oh wait! This is an ideas topic! Laughing…

I think that syntax you need for your clever workaround is probably
tags=-[one,two,three]
But you’re going to need to urlencode the values (part after each equals), so it’ll look more like
tags=-%5Bone%2Ctwo%2Cthree%5D%0A

3 Likes

@Cathy_Sarisky thanks! I did try to reply the day after so excuse the delay, the forum rules said I had to wait a day to reply (I hadn’t made any other posts since, just this one, they seem to be set a bit too strict for support IMO, as a small point of feedback)

Yeah some way to negate the tag filters in admin would be super useful, even if it’s not a primary use case. Once you start putting “other kinds” of posts into the pool (in my case, micro posts that are not treated as articles by the theme) it becomes really useful, to just say “show me everything except these 3 categories” when making any bulk changes or improvements to a certain kind of post.

Also thanks for the suggestion but the array syntax didn’t seem to work for me, even when urlencoded. It does work, no doubt, when you only specify one tag with a NOT e.g. &tag=-notthistag, for my case I just settled for this excluding the tag with the most posts, which makes the listing much clearer for browsing, but it would be nice to completely control the admin post listing based on excluding tags.

@digitalresidue I’m combining replies here in case I hit a forum limit again — thanks for your reply and tagging Cathy. In my case I have my theme (customised Casper) set up with custom routes and everything is perfect on the side of the website itself, this was just an issue trying to browse certain posts from the admin side, to make changes to them.

1 Like

Yeah, the ideas forum isn’t really meant for discussion. Unfortunately, the theme and routes can’t control how the admin panel works. Sorry to hear the array syntax didn’t work. :(