How to List Related Tags on Drupal Taxonomy Pages Using Views

Make sure you check out my previous article How to List Drupal Child Terms on Taxonomy Pages with Views as today I will extend a little bit my previous tutorial and at the end we will add related tags on taxonomy pages using views.

Tools (modules) you will need: Views module and taxonomy module enabled.

Here is the print screen:

Listing related tags on Drupal taxonomy page

Listing related tags on Drupal taxonomy page

Or see live example at Drupal development (or any tag on this blog)

This will work with simple one taxonomy per content type enabled and it will work with multiple taxonomy fields enabled per content type. I'm using two level taxonomy fields - first I have a pre-defined taxonomy fields including child levels, second I have second taxonomy field with tagging enabled in free format. Which basically means following - each article is listed into pre-defined category, like this one goes into Drupal Development, and second tags are added in free format, for example Views, Drupal tutorial... 

In following example we are going to use the power of Views attachments:

Drupal view with attachment

Open your taxonomy/term/% view and add a new attachment. Give it a nice name, Related tags, for example. 

Start by adding following contextual filter:

Content: Has taxonomy term ID (with depth)

  • Depth:0
  • Provide default value: Taxonomy Term ID from URL
  • Load default filter from term page

Relationships:

  • Content: Taxonomy terms on node
  • Require this relationship

Other:

  • Use aggregation: Yes

Format:

  • Format: Unformatted
  • Show: Fields

Fields:

  • Taxonomy term (name)
  • Taxonomy term (tid)
  • Global: Custom

Paste following in Custom field:

<div class="tax-menu">[name] <span class="small"> ([tid])</span></div>

were tax-menu and small are a div classes you can latter use for styling your sub-menu

Sort criteria:

Make sure you remove date, cause it will break things if you have enabled aggregation

  • Taxonomy Term ID, use aggregation Count

Attachment settings:

  • Attach to: Page
  • Attachment position: before

Save your view, and you should be done with technical stuff. Now it is time to apply some CSS. 

Hope this helps! 

 

Latest articles

Berlin Brandenburg Airport

In April 2026, I had my first experience with Berlin Brandenburg Airport (BER) while flying the Riga–Berlin–Riga route with airBaltic. This was my first time using Berlin’s main international airport, and overall, it left a solid impression—modern, functional, and relatively easy to navigate. About a decade ago, I had the chance to travel through…

Germany |
Embedded thumbnail for Mumbai &amp; Goa / India Trip

Mumbai & Goa / India Trip

It has already become something of a tradition for us - escaping the cold during our daughter’s winter school break and trading grey skies for warmth, color, and a slower rhythm of life. Each year, we carve out about three weeks to leave Tbilisi behind and head somewhere sunnier. And more often than not, that “somewhere” turns out to be India.Our…

India |