# Taxonomy Filters (Pro)

## How to use it

Create a *Post Selection* and assign a *Layout* as usual. (See [Creating Your First Post Selection](https://wplake.gitbook.io/advanced-views/getting-started/introduction/creating-your-first-post-selection)).

**Switch** to the *Taxonomy Filters* tab.

**Click** on the **Add Rule** button.

**Click** on the **Add Taxonomy** button.

In the **Taxonomy** dropdown, select which taxonomy you want to use.

For the *Comparison* field, select how you would like to compare the taxonomy.

Then **select** Term from the dropdown that will be used for comparison.

Click **Update** to save your *Post Selection.*

{% hint style="info" %}
Note: adding another Rule will create a relation to control how taxonomy rules will be joined within the taxonomy query using AND or OR.
{% endhint %}

## Dynamic Injection

By default, the Taxonomy filter expects a statically defined term, such as creating a *Post Selection* to query by the 'horror' genre. However, sometimes you need to define this argument dynamically. For this purpose, there is a 'Dynamic Term' field.

{% hint style="info" %}
&#x20;The 'Dynamic Term' field becomes visible only when the 'Static Term' field has no selection, and visa versa.
{% endhint %}

The 'Dynamic Term' field supports the following values:

### **$current$**

&#x20;For archive and category pages.

### **$meta$**

&#x20;For specific meta fields. For example, if you have a page with a Taxonomy meta field and need to query all posts with the term selected on the current page, you can use `$meta$.field-name`.

### **$custom-arguments$**

Allows defining the argument dynamically from [custom shortcode arguments](https://wplake.gitbook.io/advanced-views/shortcode-attributes/common-arguments), e.g., `[avf-post-selection custom-arguments="genre=my-genre-slug"]`.

**Note:** This method is useful for manually defined cases. If you need to get the value from the current page meta, using the `$meta$` mentioned above.&#x20;

## Others

{% hint style="warning" %}
Note: Do you want to customize a query (WP\_Query) that is used to get posts for a *Post Selection*, but the option is missing in the UI? You can do this using our filters. [Read more here](https://wplake.gitbook.io/advanced-views/customization/filters-and-hooks/post-selection)
{% endhint %}
