0

I work on a news publisher site and I need help excluding a taxonomy term from view but still to keep it with its own page.

E.g. Our content is organised by theme and region. For one set of articles I've added a certain tag to it. I would like to exclude articles with this tag from all region and theme view display pages, but still maintain a page with only this tag's view display. So that these certain articles will not display on the theme and region displays (though they are organised into such categories), but still display on the tag page.

So exclude tag: xyz from all pages except www.site.com/xyz

My problem is that when I filter criteria for the tag, it removes all articles from the tag's own landing page.

It would be simpler to just not give these certain articles regions and themes, but we need these to be organised as such on the back end and for future use.

Thank you in advance!!

Screenshot of my view setup, the tag in question is called "Cheat Sheet"

  • A screenshot of your View's settings would help. Are you using a contextual filter? – No Sssweat Oct 29 at 10:40
  • Hello, Thanks for replying. I've added a screenshot. I was using filter criteria (the tag in question is 'cheat sheet' as you'll see), I would love to know how a contextual filter can do this better. – Whitney Blank Oct 29 at 10:59
  • Can I see your "Has taxonomy term ID (width depth)" setting? – No Sssweat Oct 30 at 8:53
0

You seem to be on D7 and using the default Taxonomy term Views.

Out-of-box Taxonomy term Views is set up to cover all taxonomy Vocabularies you create on your site.

You can override this to "split" that functionality into more than one View, that have different settings, and control which Views is responsible for displaying which Term pages.

BTW I find it best to disable the original Taxonomy terms view, Duplicate (Clone) it and work on the Duplicate so I always have the original to reference back to.

On D7 this is usually done with the help of the Taxonomy display module although this module only provides a convenient interface for adjusting each term, but it doesn't provide the "splitting" on the Views level.

You'll have to create the second View yourself, and edit the original Taxonomy term views to exclude that special term yourself.

In the original Views you can add another Contextual filter, set it to the fixed value of the ID of your xyz term, and under More set to Exclude. This way no articles tagged with this term will appear on other term pages.

Clone the Taxonomy terms Views, name it meaningfully, and override values for the Contextual filter to only show content for the xyz term (I'm guessing ti will again be the fixed default value, but without Exclude).

You mention regions and themes a lot, but that is not how you usually control filtering in Views. So if you have more than one View listing content where you want to exclude the special xyz tagged content, you'll have to edit each view to filter out that content. There is no easy way to filter according to theme regions that I'm aware of.

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.