

<?php function ello_lite_photography_ocdi_after_import_setup() {
    // Assign the imported page as the front page
    $front_page_id = get_page_by_title('Home'); // Replace 'Home' with the title of your front page
    $blog_page_id  = get_page_by_title('Blog'); // Replace 'Blog' with the title of your blog page

    if ($front_page_id && $blog_page_id) {
        update_option('show_on_front', 'page');
        update_option('page_on_front', $front_page_id->ID); // Set the front page
        update_option('page_for_posts', $blog_page_id->ID); // Set the blog page
    }

    // Assign menus to their locations
    $main_menu = get_term_by('name', 'Main Menu', 'nav_menu'); // Replace 'Main Menu' with your menu name

    if ($main_menu) {
        set_theme_mod('nav_menu_locations', array(
            'primary' => $main_menu->term_id, // Replace 'primary' with your theme's menu location
        ));
    }
  // Set the FrontPage Template for the front page
  if ($front_page_id) {
    update_post_meta($front_page_id->ID, '_wp_page_template', 'templates/template-frontpage.php'); // Template file location
}

}
add_action('ocdi/after_import', 'ello_lite_photography_ocdi_after_import_setup');
?>