0

I have a view called (Resources) that displays content filtering by content type. These are the selected options:

  • Expose this filter to visitors, to allow them to change it: ✅
  • Filter type to expose: Single filter
  • Operator: Is one of
  • Content types: Article, Post, Story (NOTE: I have other content types, such as Basic Page that shouldn't be included in this view at all)
  • Allow multiple selections: ✅

However, when none of the options are selected, it also brings in other content types, such as Basic Page, which shouldn't be.

How can I make it so that when none of the content types in the exposed filter are selected, the results are still filtered such that the nodes must be of one of the chosen content types (Article, Post, Story)?

In other words, I would like the view to behave such that, when none of the content types are selected, it acts as though all of them are checked.

1 Answer 1

1

OK, I figured it out.

I simply added a duplicate of my "Content type" filter, except this filter is not exposed. Same settings as above ("Is one of", Article/Post/Story, etc.), just an extra restriction on the results to always filter by all of the desired content types, with the exposed filter being an additional option to further narrow down the results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.