My problem is a priori simple: I would like in a node to refer to the terms of taxonomy that concerns this node, but without "tag" this node, ie: without the node is referenced in the list corresponding to the terms of selected taxonomy.

Indeed, currently, I use an "entity reference" field for "taxonomy terms", and when I refer to a taxonomy term, the node is automatically tagged and appears in the list of nodes related to these terms of taxonomy.

Now, in other words, I would like to "quote", "link", but not "tag".


I have a node: "Ernest Hemingway", I would like to reference in this node the term taxonomy "The books of Ernest Hemingway", which allows to link / access to all the books of this writer, but for all that, I do not wish the node "Ernest Hemingway" appears in the list "The books of Ernest Hemingway", which is a list of books.

It sounds simple, but I do not find how!

Do you know how to do it?

  • Do you want this done for certain terms, so it affects all nodes tagged with it, or do you only want to exclude some small number of nodes from that page? What is the criteria when to show or exclude a tagged node from the term page? – prkos May 17 at 19:55
  • Only exclude some small number of nodes from that page. The criterion is random, but I see the solution you propose. I could for example make a taxonomy A or B, and in each node refer to A or B, and exclude for example the nodes tagged B of the list. Is this the solution you thought? – Hgfdsoiu May 17 at 22:01

The pages that list content related to specific Taxonomy terms are created through views called Taxonomy term (usually at /admin/structure/views/view/taxonomy_term).

You can control what those pages output by editing that Views. I usually disable that original View and Duplicate it to work on overrides, so I can always refer back to the original if something goes wrong.

Which exact steps to take to exclude depends on your particular needs.

If there aren't that many nodes that need to be excluded you can just add the filter for node ID, use the Is not equal to Operator and enter the ID of the node that is not supposed to be found on Taxonomy term pages.

This solution will exclude that node from all the terms pages. If that node is referencing more than one term, it will not display on any of the terms pages.

To exclude more than one node you can add as many ID filters as you need, or more conveniently use the Regular expression, see this answer for more info: How to exclude multiple nodes based on their ID in taxonomy term view?

If you need to exclude your list of nodes from terms from one Vocabulary, but not from all the other Vocabularies, you'd have to modify the Contextual filter settings in those Views and configure separate ones for that special vocabulary and then the other Contextual for all the rest. You'd have to use the OR instead of AND (there's a module for that). This requires a bit more experience with Views configuration.

Another way may be to create a new field on your content, it probably makes the most sense to make it of type Boolean, that only have true/false states, and set those special nodes to True for that field (hide that field on Manage display, this is just your internal mark). Then in Taxonomy Views exclude the nodes that have that field set to True.

The advantage of this approach is that you control that when creating/editing nodes, while in the above solution you have to go edit Views each time.

Anything more than that you'd have to think about your site structure and change filters in Views to match that logic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.