How To Hide multiple nodes using Views in Drupal ?

   comments
Share

In this blog, we are going to explore about how to hide multiple nodes using Views. Excluding multiple nodes using Drupal Views need not required any additional modules, it's just a trick.

Let’s see the following steps by which we can hide multiple nodes with views:---

  1. Create your views as your requirement.
  2. Expand the 'Advanced' options on the right side and Click 'Add' next to 'Contextual Filters'.

    click_advanced

  3. Type 'nid' in the search box filtering the results to just 'Content: Nid' then check this box and click 'Apply (all displays)' button.

    add_nid_Img

  4. Click on 'Provide default value' next to When the filter value is NOT availableand enter the node ID's which you want to exclude separated by a comma such as: '54,56,60'.

    enter_nid

  5. Now Expand the 'More' at the bottom.
  6. Check the box 'Allow multiple values' & 'Exclude' and click 'Apply (all displays)' button.

    exclude_multiple_node_img

  7. Now check view output you will found the above nodes are excluded from result.

Add new comment