# Make Custom Taxonomies Translatable in Polylang

> Turns on Polylang translation for custom taxonomies, such as product types or event categories, that are not offered in Languages > Settings.

- Type: PHP
- Runs: Run everywhere
- Category: [Multilingual](https://wpide.com/library/category/multilingual/)
- Tags: polylang, taxonomies, translations
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/pll-translatable-taxonomies/

## Code

```php
$wpide_taxonomies = array( 'genre', 'location' ); // Taxonomy keys.

add_filter( 'pll_get_taxonomies', function ( $taxonomies, $is_settings ) use ( $wpide_taxonomies ) {
    foreach ( $wpide_taxonomies as $taxonomy ) {
        if ( $is_settings ) {
            unset( $taxonomies[ $taxonomy ] );
        } else {
            $taxonomies[ $taxonomy ] = $taxonomy;
        }
    }

    return $taxonomies;
}, 10, 2 );
```

## Notes

Use the taxonomy keys; they are hidden from Polylang's settings list because this snippet manages them. Translate existing terms afterwards in each taxonomy's screen.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Make Custom Taxonomies Translatable in Polylang" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
