Taxonomy term name as contextual filter for view

Question:
How to use Taxonomy term name as contextual filter for view?

1. Open Views

1.1 Navigate to your View within the Views UI.

2. Add a Relationship

2.1 Under 'Advanced' select Add by Relationships

Image:
Add a Relationship
Add a Relationship

2.2 After clicking Add select the 'Taxonomy terms on node' as the relationship to add.

Image:
Taxonomy terms on node
Taxonomy terms on node

2.3 Select the appropriate Vocabulary.  For example, below Tags has been selected.

Image:
Select the appropriate vocabulary
Select the vocabulary

3. Add a Contextual Filter

3.1 Under 'Advanced' select Add by Contextual Filters

Image:
Add contextual filter
Add contextual filter

3.2 Select 'Name' in the category 'Taxonomy Term'.

Image:
Taxonomy Term Name
Taxonomy Term Name

3.3 Save the new contextual filter and Save the View.

4. Access your View using the taxonomy term names

Thereafter you should be able to filter your View using the taxonomy term names.

To do so view your filter as normal and then append the taxonomy term to the end of the URL path for your view.

So for example we have the URL path of:

  • https://www.zerotouch.com/faqs

To limit this to just the faqs with the taxonomy term name of 'unix' use:

  • https://www.zerotouch.com/faqs/unix

5. Notice about Duplicates

Where a node has multiple terms applied then it will be called for each taxonomy term.  Therefore, if a node has 4 taxonomy terms then it will be called 4-times unless the taxonomy term is specified in the URL path for the view.

Taxonomy:
Drupal version: