Title: is_taxonomy_viewable
Published: February 22, 2019
Last modified: February 24, 2026

---

# is_taxonomy_viewable( string|WP_Taxonomy $taxonomy ): bool

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/is_taxonomy_viewable/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/is_taxonomy_viewable/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/is_taxonomy_viewable/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/is_taxonomy_viewable/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/is_taxonomy_viewable/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/is_taxonomy_viewable/?output_format=md#wp--skip-link--target)

Determines whether a taxonomy is considered “viewable”.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/is_taxonomy_viewable/?output_format=md#parameters)󠁿

 `$taxonomy`string|[WP_Taxonomy](https://developer.wordpress.org/reference/classes/wp_taxonomy/)
required

Taxonomy name or object.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/is_taxonomy_viewable/?output_format=md#return)󠁿

 bool Whether the taxonomy should be considered viewable.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/is_taxonomy_viewable/?output_format=md#source)󠁿

    ```php
    function is_taxonomy_viewable( $taxonomy ) {
    	if ( is_scalar( $taxonomy ) ) {
    		$taxonomy = get_taxonomy( $taxonomy );
    		if ( ! $taxonomy ) {
    			return false;
    		}
    	}

    	return $taxonomy->publicly_queryable;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/taxonomy.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/taxonomy.php#L5101)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/taxonomy.php#L5101-L5110)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/is_taxonomy_viewable/?output_format=md#related)󠁿

| Uses | Description | 
| [get_taxonomy()](https://developer.wordpress.org/reference/functions/get_taxonomy/)`wp-includes/taxonomy.php` |

Retrieves the taxonomy object of $taxonomy.

  |

| Used by | Description | 
| [is_term_publicly_viewable()](https://developer.wordpress.org/reference/functions/is_term_publicly_viewable/)`wp-includes/taxonomy.php` |

Determines whether a term is publicly viewable.

  | 
| [build_query_vars_from_query_block()](https://developer.wordpress.org/reference/functions/build_query_vars_from_query_block/)`wp-includes/blocks.php` |

Helper function that constructs a [WP_Query](https://developer.wordpress.org/reference/classes/wp_query/) args array from a `Query` block properties.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/is_taxonomy_viewable/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.1.0](https://developer.wordpress.org/reference/since/5.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_taxonomy_viewable%2F)
before being able to contribute a note or feedback.