Multiple filter arguments in routes.yaml

Hi Everyone,

In my route file, I have a filter to remove featured post from the home page as they are displayed in a specific box elsewhere. I’d like to also filter out posts that have a specific internal tag. I tried using two lines of filter, but Ghost does not accept it, neither this one below,

collections:
  /:
    permalink: /blog/{slug}/
    template: index
    filter: featured:false, 'tag:-hash-announcement'

Any idea, how to have 2 arguments for a filter?

I don’t think that’s valid yaml :slight_smile:

You can use the and operator like so:

filter: 'featured:false+tag:-hash-announcement'

Filtering reference: Ghost Content API Documentation

1 Like

@vikaspotluri123, indeed it wasn’t valid yaml, but your solution works perfectly :slight_smile: