Skip Navigation

[Resolved] Exclude taxonomy terms from a custom search via url parameter

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to hide certain taxonomy terms from a custom search filter by using a URL parameter.

Solution: This type of customization is not possible in the current system and would require custom code. Instead, you could use a separate taxonomy for the terms, or you could use custom links instead of filters.

This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by juliaM-5 6 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#630669

I am trying to: display archives based on taxonomy via url parameter

Link to a page where the issue can be seen: hidden link

I'd like to be able to exclude 'gifts' term from the list of taxonomy terms that the user can view...it will be displayed in an alternate format elsewhere. Can this be done?

Currently looks like this:

[wpv-filter-start hide="false"]
<article class="hentry">
<div class="portfolio-filtering">
[wpv-filter-controls]
	[wpv-control-post-taxonomy taxonomy="art-category" type="radios" default_label="All Artwork" url_param="wpv-art-category" output="legacy"]
[/wpv-filter-controls]
  </div>
  </article>
[wpv-filter-end]
#631097

Hi, it sounds like you would like to filter the taxonomy filter options, based on a URL parameter. I'm afraid there's not a simple way to do this without custom code. The taxonomy filter is not designed to be restricted on a per-term basis, it's designed to show all the possible options. If you want to remove a term, it might make sense to create a separate custom taxonomy.

On the other hand, if you only have a few terms to manage, you might be able to achieve something similar manually by creating custom links for each of the terms you want to display at the top. Configure your View or WordPress Archive to update the URL whenever filters are changed. Then configure your custom links to point to the proper filtered URLs, and hide the current front-end filters from your Users. Instead of clicking a filter radio, they will click one of the term links at the top, and the page will reload to show the correct results.

#631226

Thanks Christian. I decided to break Gifts out as a separate CPT with its own taxonomy and avoid the issue altogether!

The forum ‘Types Community Support’ is closed to new topics and replies.