Need some help with your project? Contact me

How to customize the taxonomy term page in Drupal 7 with Views

This tutorial will show you how to use Views and change the way the taxonomy term pages show information regarding the nodes assigned with the respective term.

Generally the taxonomy term page outputs teasers of all the nodes which have been assigned with that term. So if you wanted to change what information comes out in those teasers, I suppose you can manage the display of the teaser view mode with Display Suite or something. But, what if you don’t want to change the teaser, or you simply can’t make the teaser give out the information you want on the taxonomy term page?

You can use Views to rewrite the taxonomy term page very easily. If you installed Views, you'll notice a disabled View called Taxonomy Term which emulates how the taxonomy term page looks like in default conditions. You need to rewrite that and change the data the taxonomy term page displays about its nodes.

If you want to rewrite it, it is best if you made a clone rather than edit the default one. Just in case something goes wrong and you need to revert back to the original View.

Then just give it a new name like Taxonomy Rewrite and you can start editing the clone – make sure the clone at least is enabled.

Once you start editing the View, you probably notice in the Format tab that the View shows Content – Teaser. This is what you need to change into Fields in order to select what kind of information you want displayed about each of the nodes included in the taxonomy term page. And here you can also play around, add a bunch of fields (you’ll need to add at least one), rewrite the way they output, use CSS and many other cool features.

Just like when you normally use Views, you can then sort your results, use a pager and all sorts of things. At the end of these edits, save your new View and then load a taxonomy term page. Instead of a list of teasers, it should now display a list of sets of fields about each node with that term – just like a regular View.

Hope this helps.


Notice that if you use more than 1 views to override the same term Drupal will use tha latest saved views (and may also have problems).
So I would suggest anyone to avoid having more than 1 taxonomy views for the same term or try to be more generic (eg one only taxonomy term rewrite for all terms).

Thanks a lot for the good tip!

Thanks for the article.
I'm trying to set up a page that has 2 tabs(by using page setting in views). I have set it up but the problem is when I click in the tab I see the taxonomy path instead of alias ? (for example taxonomy/term/6/digital instead of CCTV/digital However default menu tab still work correctly and show the alias CCTV) Is there any way to show the alias instead of taxonomy term address ?

Can I point out the simply excellent solution:

you set the corresponding view for each Vocabulary. The module passes along any arguments into your view "et voila".

I also ran into problem to have different pages for different vocabularies. I am quite happy with Taxonomy Display which hooks into the "Manage Display" of Vocabularies and also allows for easy views integration plus other goodies. Worth a check out:

Thanks for the tip!

Another vote for Taxonomy display. Simple to setup and saved me from messing on creating custom tpl files.

By overriding term view we will loose term description that was present with normal page. There is not simple method to add description to views expect adding entity api (for rendered node, description as group) or enabling PHP filter module which most of the drupal experts might not suggest.

I cloned the view, changed the format to show fields, but I noticed that somehow it was not being used. The original one, even disabled was the one being used instead...

Add new comment

You can post comments in Markdown and basic HTML tags.
For code blocks, wrap your code within '~~~'. For example:
$var = 'my variable';