Skip to main content

Interface: PostOrPostsParams

Defined in: packages/core/src/data/strategies/PostOrPostsFetchStrategy.ts:16

The params supported by PostOrPostsFetchStrategy

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


archive​

archive: Partial<PostsArchiveParams>

Defined in: packages/core/src/data/strategies/PostOrPostsFetchStrategy.ts:25

The archive params corresponds to PostsArchiveParams


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


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


priority​

priority: "archive" | "single"

Defined in: packages/core/src/data/strategies/PostOrPostsFetchStrategy.ts:30

The priority indicates which strategy should execute first.


routeMatchStrategy​

routeMatchStrategy: "none" | "archive" | "single" | "both"

Defined in: packages/core/src/data/strategies/PostOrPostsFetchStrategy.ts:39

How to handle route matching strategy, the possible values are:

  • single will only trigger the single strategy if there's a url match for the single strategy
  • archive will only trigger the archive strategy if there's a url match for the archive strategy
  • both requires a route match for both single and archive

single​

single: Partial<PostParams>

Defined in: packages/core/src/data/strategies/PostOrPostsFetchStrategy.ts:20

The single params corresponds to PostParams