So you want Views to exclude some nodes from your view. Easy enough right? Just go to your view and  below filter click 'add' and select 'node id' and.... but wait a second! Now I can only filter just one node! How impractical... I need to filter at least a couple of nodes! No worries, there is a solution you just need to know where to look.

Exclude multiple nodes with Views

28/10/2015 - 19:10
  1. In your view go click open the 'Advanced' options on the right side.
  2. Click 'Add' next to 'Contextual Filters'.
  3. Type 'nid' in the search box filtering the results to just 'Content: Nid'.
  4. Check the box.
  5. Below click 'Apply (all displays)'.
  6. Click on 'Provide default value' and enter the ID's of the nodes you want to exclude separated by a comma like this: '23,28,30'.
  7. Now for the magic: At the bottom click on 'More'.
  8. Check the box 'Allow multiple values' and 'Exclude'.

Exclude multiple nodes with Views

Voila! Multiple nodes are now excluded.

Want to become a Drupal Expert?

Subscribe to my newsletter and receive e-mails with the latest Drupal tutorials, tips and tricks.