Abuja Digital Studio · Est. 2018
Start a Project
DocsOrravo TemplatesPreview and import flow
Reference

Preview and import flow

Orravo Templatesorravo.com/docs/orravo-templates/preview-import

Preview and import flow

Preview

Orv_Tpl_Preview registers a query var so the URL /?orv_tpl_preview=<key> renders the template's first page through the Page Builder's render pipeline without writing any posts. Useful for quick browsing - close the tab when done.

Import

Orv_Tpl_Importer::import( $key, $options = [] ) is the main entry point. It is idempotent: re-running on the same key reuses existing posts marked with _orv_tpl_key meta.

Options you can pass:

  • status - target post status (draft or publish). Default draft.
  • assign_front - set the first imported page as the static front page.
  • update_theme_mods - apply the template's recommended theme mods (colors, typography).

Other importer entry points

php// Create a single new page from a subset of the template
Orv_Tpl_Importer::create_page_from_selection(
    $key,
    'My new page',
    [ /* section indices */ ],
    'orv_page'
);

// Append selected sections to an existing post
Orv_Tpl_Importer::append_sections_to_page( $key, $post_id, $selection );

// Remove every post imported under a key (trash by default)
Orv_Tpl_Importer::cleanup( $key );

Image sideloading

Every remote image URL in the manifest is downloaded into the WP Media Library through Orv_Image_Sideloader. Failures land in the option orv_tpl_sideload_reports and surface as an admin notice the next time you open the library. The notice has a dismiss form gated by manage_options and a wp_verify_nonce check.

Preview and import flow · Orravo Templates Docs | Orravo