Skip to main content

Interface: PostsArchiveParams

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:31

The EndpointParams supported by the PostsArchiveFetchStrategy

Extends​

Indexable​

[k: string]: unknown

Properties​

_embed?​

optional _embed: boolean

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:17

The _embed param returned associated entities in the response

It's recommended to avoid additional requests to fetch data

Inherited from​

EndpointParams._embed


_fields?​

optional _fields: string[]

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:22

The _fields parameter is used to return only the specified fields in the response

Inherited from​

EndpointParams._fields


author?​

optional author: string | number | number[]

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:83

Limit result set to posts assigned to specific authors.


author_exclude?​

optional author_exclude: number | number[]

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:88

Ensure result set excludes posts assigned to specific authors.


categories?​

optional categories: string | number | string[] | number[]

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:156

Limit result set to all items that have the specified term assigned in the categories taxonomy.


categories_exclude?​

optional categories_exclude: number | number[]

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:161

Limit result set to all items except those that have the specified term assigned in the categories taxonomy.


category?​

optional category: string | number | number[]

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:44

If set will filter results by the specified category name

It supports both a category id and category slug


day?​

optional day: string

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:66

If set will filter results by the specified day


exclude?​

optional exclude: number[]

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:93

Ensure result set excludes specific IDs.


include?​

optional include: number[]

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:98

Limit result set to specific IDs.


lang?​

optional lang: string

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:29

The polylang ?lang parameter.

This is only used if the polylang integration is enabled

Inherited from​

EndpointParams.lang


matchArchivePath?​

optional matchArchivePath: boolean

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:190

Overrides the value set in CustomTaxonomy#matchArchivePath

Default​

false

month?​

optional month: string

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:61

If set will filter results by the specified month


offset?​

optional offset: number

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:103

Offset the result set by a specific number of items.


optimizeYoastPayload?​

optional optimizeYoastPayload: boolean

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:36

The custom parameter to optimize the Yoast payload.

This is only used if the YoastSEO integration is enabled

Inherited from​

EndpointParams.optimizeYoastPayload


order?​

optional order: "desc" | "asc"

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:110

Order sort attribute ascending or descending.

Default​

'desc'

orderby?​

optional orderby: "slug" | "id" | "title" | "date" | "modified" | "author" | "parent" | "include" | "relevance" | "include_slugs"

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:129

Sort collection by object attribute.

Default​

'date'

page?​

optional page: number

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:37

Current page of the collection.

Default​

1

per_page?​

optional per_page: number

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:73

Maximum number of items to be returned in result set.

Default​

10

postType?​

optional postType: string

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:117

The post type to query for.

Default​

'post'

optional search: string

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:78

Limit results to those matching a string.


slug?​

optional slug: string | string[]

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:122

Limit result set to posts with one or more specific slugs.


status?​

optional status: string | string[]

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:146

Limit result set to posts assigned one or more statuses.

Default​

'publish'

sticky?​

optional sticky: boolean

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:183

Limit result set to items that are sticky.


tag?​

optional tag: string | number

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:51

If set will filter results by the specified tag name

It supports both a category id and category slug


tags?​

optional tags: string | number | string[] | number[]

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:173

Limit result set to all items that have the specified term assigned in the tags taxonomy.


tags_exclude?​

optional tags_exclude: number | number[]

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:178

Limit result set to all items except those that have the specified term assigned in the tags taxonomy.


tax_relation?​

optional tax_relation: "AND" | "OR"

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:151

Limit result set based on relationship between multiple taxonomies.


taxonomy?​

optional taxonomy: string

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:168

Limit results to a specific taxonomy and expects the actual term slug to come from the url]

If you only specify the taxonomy, the term slug will be assumed to be the first segment of the path


year?​

optional year: string

Defined in: packages/core/src/data/strategies/PostsArchiveFetchStrategy.ts:56

If set will filter results by the specified year