Skip to content

utils/wp-api/pages

function importPagesFromWPAPI(endpoint: string): Promise<void>

Defined in: studiocms/packages/studiocms_devapps/src/utils/wp-api/pages.ts:67

Imports pages from a WordPress API endpoint.

This function fetches all pages from the specified WordPress API endpoint and imports each page individually.

string

The WordPress API endpoint to fetch pages from.

Promise<void>

A promise that resolves when all pages have been imported.

Will throw an error if the pages cannot be imported.