📚
Ncmaz WordPress theme
New Ncmaz FSEBuy theme now Old demo
  • ⚠️Welcome
  • ☃️Community
    • 🧬Ncmaz theme, React & Graphql
    • 👋Community
  • THEME INSTALLATION
    • Configure Server Settings
    • Download and Install Theme
    • Install Default Plugins
    • Import Demo Contents
      • [ERROR] Failed to import "Home 2" page
    • How do I Update the Theme?
    • 💡Update theme manually
    • Install theme with Multisite
    • 🧐Error after update theme!
  • SING-IN / SIGN-UP
    • SignIn/SignUp With Socials
  • THEME OPTIONS
    • Translation language on front-end react components
    • How to change fonts and theme colors?
    • Customize the radius level for the theme.
    • Enable sidebar in archive pages
  • HEADER - LOGO - MENU
    • Header settings
    • How to setting megamenu?
    • Custom top notify message
  • FAVORITES
    • Icon for Favorite button
    • Custom Reading Time
    • Custom for Favorite
  • Gutenbergs
    • Gutenberg version 3 🎉
    • Ncmaz Gutenberg blocks
    • Build a home page with Ncmaz gutenbergs
    • Add form in Ncmaz Newsletter Block
    • Unexpected token < JSON at position 0
    • This block contains unexpected or invalid content.
    • Using the Elementor plugin?
    • Add Typo default Gutenberg block on Home page (page template is Ncmaz-custom-page)
    • Custom Ncmaz Newsletter Block
    • Widget Ncmaz Gutenberg blocks
    • Issue with Ncmaz users block
  • SINGLE
    • Setting Post format Video, Audio, Gallery
    • Setting single style and toggle single sidebar widgets
    • (Deprecated) Create Post-Submission pages
    • Add Ncmaz Gutenberg blocks to single post
  • ❓How to?
    • Update theme?
    • Translate some missing words
    • Thumbnails are blurry when viewed in mobile mode.
    • Fix hidden login modal on mobile?
    • Style dashboard, account page break?
    • Customize fields in dashboard sections at Frontend
    • Import RTL demo data
    • Integrate the Polylang plugin into the theme
    • (Deprecated) Add ACF fields to the wp-user-frontend-pro form
    • (Deprecated) Create account page (wfu) ?
    • Create frontend submission post page and edit account page
    • You don't have permission to submission the post.
    • Optimize performance and improve GTmetrix score, Google PageSpeed Insights
    • Cover image for archive pages. Settings number of tags, categories on submit post page
    • Ncmaz-frontend plugin project development
    • How to get Youtube video ID
    • Social share link
  • Footers
    • Footer widgets
  • 💊Custom CSS
    • Custom CSS
    • Header custom CSS
    • Change default Bg image on Archive page
  • 🕯️CHANGE LOG
    • Support
    • Change log
  • Ncmaz ACF fields
Powered by GitBook
On this page
  • - You get an error that you cannot import home pages when importing demo data
  • - Cause:
  • - Resolve:

Was this helpful?

  1. THEME INSTALLATION
  2. Import Demo Contents

[ERROR] Failed to import "Home 2" page

PreviousImport Demo ContentsNextHow do I Update the Theme?

Last updated 10 months ago

Was this helpful?

- You get an error that you cannot import home pages when importing demo data

- Cause:

The problem may be due to a security plugin/or a security configuration that prevents pages containing Emoij characters from being added. Because the theme's home pages contain Emoji characters, WordPress cannot import them.

- Resolve:

  1. The workaround is that you need to find your security plugin or security configuration and temporarily close it.

  2. add_filter( 'wp_insert_post_data', function( $data, $postarr ) {
    if ( ! empty( $data['post_content'] ) ) {
        $data['post_content'] = wp_encode_emoji( $data['post_content'] );
    }
    return $data;
    }, 99, 2 );

    To add a PHP function to your WordPress site:

    • Navigate to Theme File Editor: go to Appearance > Theme File Editor.

    • Select the functions.php File:

      • On the right side, you’ll see a list of theme files. Find and click on functions.php under the Theme Files section. This file is typically listed as Theme Functions.

    • Add Your PHP Function

    • Save

​​

Or a simpler way is to use to remove the Emoji characters in the demo pages and then import will work fine.

this custom PHP function