---
title: "Taxonomies"
date: 2023-03-17
author: "nK"
---

# Taxonomies

Projects have two taxonomies.

TaxonomySlugHierarchicalURL base (default)**Portfolio Categories**`portfolio_category`yes`/portfolio-category/name/`**Portfolio Tags**`portfolio_tag`no`/portfolio-tag/name/`Manage them under **Visual Portfolio → Categories** and **Visual Portfolio → Tags**, or in the project sidebar. The URL bases are changed in [Settings → Permalinks](https://staging.visualportfolio.com/docs/settings/permalinks/).

![](https://staging.visualportfolio.com/wp-content/uploads/2024/07/Shot-2024-07-11-at-17.10.42-1024x574.png)![](https://staging.visualportfolio.com/wp-content/uploads/2024/07/Shot-2024-07-11-at-17.10.42-1024x574.png)    ## Where they appear

- **In galleries.** Portfolio Categories are the items of the [Filter](https://staging.visualportfolio.com/docs/gallery-blocks/layout-elements/filter/) and the “categories” line of an item (Display Categories in the skin). Tags are not listed in the filter unless `portfolio_tag` is added to **Settings → General → Filter Taxonomies**.
- **As archives.** `/portfolio-category/name/` and `/portfolio-tag/name/` are rendered by the [Portfolio page](https://staging.visualportfolio.com/docs/portfolio-archive/), filtered to that term.
- **On single project pages.** Your theme decides. In a block theme, the core **Post Terms** block offers “Portfolio Categories” and “Portfolio Tags” variations in the Single item: Project template. In a classic theme use `the_terms( get_the_ID(), 'portfolio_category' )` or `get_the_term_list()`.

![](https://staging.visualportfolio.com/wp-content/uploads/2023/03/Shot-2023-03-17-at-16.42.45-1024x678.png)![](https://staging.visualportfolio.com/wp-content/uploads/2023/03/Shot-2023-03-17-at-16.42.45-1024x678.png)    ![](https://staging.visualportfolio.com/wp-content/uploads/2023/03/Shot-2023-03-17-at-16.45.02-1024x664.png)![](https://staging.visualportfolio.com/wp-content/uploads/2023/03/Shot-2023-03-17-at-16.45.02-1024x664.png)    ## Term thumbnail (Pro)

Every term of a public taxonomy (Portfolio Categories, Portfolio Tags, post categories, product categories, custom taxonomies) gets a **Thumbnail** field on its Add and Edit screens. It is used by the [Taxonomies content source](https://staging.visualportfolio.com/docs/gallery-blocks/content-source/taxonomies/), which shows terms as gallery items. Saving it needs the “manage categories” capability. Without a thumbnail, the source falls back to the featured image of the newest post in the term, then to the Placeholder Image.

## PHP

```
// Terms of the current project.
$categories = wp_get_post_terms( get_the_ID(), 'portfolio_category' );
$tags       = wp_get_post_terms( get_the_ID(), 'portfolio_tag' );

// All terms, including empty ones.
$all_categories = get_terms( array( 'taxonomy' => 'portfolio_category', 'hide_empty' => false ) );
```