Skip to content

Latest commit

 

History

History
226 lines (212 loc) · 5.94 KB

taxonomies.md

File metadata and controls

226 lines (212 loc) · 5.94 KB


Taxonomies

Schema

The schema defines all the fields that exist within a taxonomy record. Any response from these endpoints can be expected to contain the fields below unless the `_filter` query parameter is used or the schema field only appears in a specific context.

capabilities

All capabilities used by the taxonomy.

JSON data type: object

Read only

Context: edit

description

A human-readable description of the taxonomy.

JSON data type: string

Read only

Context: view, edit

hierarchical

Whether or not the taxonomy should have children.

JSON data type: boolean

Read only

Context: view, edit

labels

Human-readable labels for the taxonomy for various contexts.

JSON data type: object

Read only

Context: edit

name

The title for the taxonomy.

JSON data type: string

Read only

Context: view, edit, embed

slug

An alphanumeric identifier for the taxonomy.

JSON data type: string

Read only

Context: view, edit, embed

show_cloud

Whether or not the term cloud should be displayed.

JSON data type: boolean

Read only

Context: edit

types

Types associated with the taxonomy.

JSON data type: array

Read only

Context: view, edit

rest_base

REST base route for the taxonomy.

JSON data type: string

Read only

Context: view, edit, embed

rest_namespace

REST namespace route for the taxonomy.

JSON data type: string

Read only

Context: view, edit, embed

visibility

The visibility settings for the taxonomy.

JSON data type: object

Read only

Context: edit

</div>

Retrieve a Taxonomy

	<h3>Definition & Example Request</h3>

	<code>GET /wp/v2/taxonomies</code>

	<p>Query this endpoint to retrieve a specific taxonomy record.</p>

	<code>$ curl https://example.com/wp-json/wp/v2/taxonomies</code>
</div>
<div class="secondary">
		<h3>Arguments</h3>
<table class="arguments">
				<tr>
			<td>
										<code>context</code><br />
								</td>
			<td>
										<p>Scope under which the request is made; determines fields present in response.</p>
																				<p class="default">
						Default: <code>view</code>
					</p>
															<p>One of: <code>view</code>, <code>embed</code>, <code>edit</code></p>
								</td>
		</tr>
				<tr>
			<td>
										<code>type</code><br />
								</td>
			<td>
										<p>Limit results to taxonomies associated with a specific post type.</p>
																							</td>
		</tr>
		</table>

</div>

Retrieve a Taxonomy

	<h3>Definition & Example Request</h3>

	<code>GET /wp/v2/taxonomies/&lt;taxonomy&gt;</code>

	<p>Query this endpoint to retrieve a specific taxonomy record.</p>

	<code>$ curl https://example.com/wp-json/wp/v2/taxonomies/&lt;taxonomy&gt;</code>
</div>
<div class="secondary">
		<h3>Arguments</h3>
<table class="arguments">
				<tr>
			<td>
										<code>taxonomy</code><br />
								</td>
			<td>
										<p>An alphanumeric identifier for the taxonomy.</p>
																							</td>
		</tr>
				<tr>
			<td>
										<code>context</code><br />
								</td>
			<td>
										<p>Scope under which the request is made; determines fields present in response.</p>
																				<p class="default">
						Default: <code>view</code>
					</p>
															<p>One of: <code>view</code>, <code>embed</code>, <code>edit</code></p>
								</td>
		</tr>
		</table>

</div>