The customizer import file is not in a correct format.
-
Hello,
i’m using a “One Click Demo Importer” plugin to import demo site.
but i can’t properly import files while i using local import files (from theme folder)?
See below code:
<?php function thme_import_files() { return array( array( 'import_file_name' => 'Demo Import 1', 'local_import_file' => trailingslashit( get_template_directory() ) . 'inc/eocdi/demo-content.xml', 'local_import_widget_file' => trailingslashit( get_template_directory() ) . 'inc/eocdi/widgets.json', 'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/eocdi/customizer.dat', 'import_preview_image_url' => trailingslashit( get_template_directory() ) . 'screenshot.png', 'import_notice' => __( 'Save time by import our demo data, your website will be set up and ready to customize in minutes.', 'text-domian' ), 'preview_url' => 'https://www.demo.webhuntinfotech.com/themename', ), ); } add_filter( 'pt-ocdi/import_files', 'thme_import_files' ); function thme_after_import_setup() { // Assign front page and posts page (blog page). $front_page_id = get_page_by_title( 'Home' ); $blog_page_id = get_page_by_title( 'Blog' ); update_option( 'show_on_front', 'page' ); update_option( 'page_on_front', $front_page_id->ID ); update_option( 'page_for_posts', $blog_page_id->ID ); // Assign menus to their locations. $main_menu = get_term_by( 'name', 'Primary Menu', 'nav_menu' ); $top_menu = get_term_by( 'name', 'Top Menu', 'nav_menu' ); set_theme_mod( 'nav_menu_locations', array( 'primary' => $main_menu->term_id, 'top' => $top_menu->term_id, ) ); } add_action( 'pt-ocdi/after_import', 'thme_after_import_setup' ); ?>
When i’m open log file its showing below error :
Error : The customizer import file is not in a correct format. Please make sure to use the correct customizer import file.
See log file here
See customizer.dat file here
See demo-content.xml file here
See widgets.json file here
Please provide soloution ASAP.
Thank You
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘The customizer import file is not in a correct format.’ is closed to new replies.