Skip to content

utils/wp-api/posts

function importPostsFromWPAPI(endpoint: string, useBlogPkg: boolean): Promise<void>

Defined in: studiocms/packages/studiocms_devapps/src/utils/wp-api/posts.ts:66

Imports posts from a WordPress API endpoint.

string

The API endpoint to fetch posts from.

boolean

A boolean indicating whether to use the blog package.

Promise<void>

A promise that resolves when all posts have been imported.

Will throw an error if the import process fails.