Skip to main content

Interface: PostsArchiveParams

@headstartwp/core.PostsArchiveParams

The EndpointParams supported by the PostsArchiveFetchStrategy

Hierarchy

Properties

_embed

Optional _embed: boolean

The _embed param returned associated entities in the response

It's recommended to avoid additional requests to fetch data

Inherited from

EndpointParams._embed

Defined in

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


_fields

Optional _fields: string[]

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

Inherited from

EndpointParams._fields

Defined in

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


author

Optional author: string | number | number[]

Limit result set to posts assigned to specific authors.

Defined in

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


author_exclude

Optional author_exclude: number | number[]

Ensure result set excludes posts assigned to specific authors.

Defined in

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


categories

Optional categories: string | number | string[] | number[]

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

Defined in

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


categories_exclude

Optional categories_exclude: number | number[]

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

Defined in

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


category

Optional category: string | number | number[]

If set will filter results by the specified category name

It supports both a category id and category slug

Defined in

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


day

Optional day: string

If set will filter results by the specified day

Defined in

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


exclude

Optional exclude: number[]

Ensure result set excludes specific IDs.

Defined in

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


include

Optional include: number[]

Limit result set to specific IDs.

Defined in

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


lang

Optional lang: string

The polylang ?lang parameter.

This is only used if the polylang integration is enabled

Inherited from

EndpointParams.lang

Defined in

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


matchArchivePath

Optional matchArchivePath: boolean

Overrides the value set in CustomTaxonomy#matchArchivePath

Default

false

Defined in

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


month

Optional month: string

If set will filter results by the specified month

Defined in

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


offset

Optional offset: number

Offset the result set by a specific number of items.

Defined in

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


order

Optional order: "asc" | "desc"

Order sort attribute ascending or descending.

Default

'desc'

Defined in

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


orderby

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

Sort collection by object attribute.

Default

'date'

Defined in

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


page

Optional page: number

Current page of the collection.

Default

1

Defined in

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


per_page

Optional per_page: number

Maximum number of items to be returned in result set.

Default

10

Defined in

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


postType

Optional postType: string

The post type to query for.

Default

'post'

Defined in

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


Optional search: string

Limit results to those matching a string.

Defined in

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


slug

Optional slug: string | string[]

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

Defined in

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


status

Optional status: string | string[]

Limit result set to posts assigned one or more statuses.

Default

'publish'

Defined in

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


sticky

Optional sticky: boolean

Limit result set to items that are sticky.

Defined in

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


tag

Optional tag: string | number

If set will filter results by the specified tag name

It supports both a category id and category slug

Defined in

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


tags

Optional tags: string | number | string[] | number[]

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

Defined in

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


tags_exclude

Optional tags_exclude: number | number[]

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

Defined in

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


tax_relation

Optional tax_relation: "AND" | "OR"

Limit result set based on relationship between multiple taxonomies.

Defined in

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


taxonomy

Optional taxonomy: string

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

Defined in

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


year

Optional year: string

If set will filter results by the specified year

Defined in

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