Pattern Directory Items Edit

Schema

The schema defines all the fields that exist within a pattern directory item 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.

id

integer
The pattern ID.

Context: view, edit, embed

title

string
The pattern title, in human readable format.

Context: view, edit, embed

content

string
The pattern content.

Context: view, edit, embed

categories

array
The pattern's category slugs.

Context: view, edit, embed

keywords

array
The pattern's keywords.

Context: view, edit, embed

description

string
A description of the pattern.

Context: view, edit, embed

viewport_width

integer
The preferred width of the viewport when previewing a pattern, in pixels.

Context: view, edit, embed

block_types

array
The block types which can use this pattern.

Context: view, embed

Top ↑

List Pattern Directory Items

Query this endpoint to retrieve a collection of pattern directory items. The response you receive can be controlled and filtered using the URL query parameters below.

Top ↑

Definition

GET /wp/v2/pattern-directory/patterns

Top ↑

Example Request

$ curl https://example.com/wp-json/wp/v2/pattern-directory/patterns

Top ↑

Arguments

context Scope under which the request is made; determines fields present in response.

Default: view

One of: view, embed, edit

page Current page of the collection.

Default: 1

per_page Maximum number of items to be returned in result set.

Default: 100

search Limit results to those matching a string.
category Limit results to those matching a category ID.
keyword Limit results to those matching a keyword ID.
slug Limit results to those matching a pattern (slug).
offset Offset the result set by a specific number of items.
order Order sort attribute ascending or descending.

Default: desc

One of: asc, desc

orderby Sort collection by post attribute.

Default: date

One of: author, date, id, include, modified, parent, relevance, slug, include_slugs, title, favorite_count