Background of the issue:
I am trying to import a custom content field for my posts on hidden link. Most of the fields are filled except the one that is in a custom block with ACF WYSIWYG Editor.
Symptoms:
Unable to import CSV with WP All Import to fill ACF custom content block.
Questions:
How can I import a custom content field using WP All Import for a custom block with ACF WYSIWYG Editor?
I found out that the content is updated in the post_meta table a field of content is created with the translations from the csv, however, I am using ACF Gutenberg blocks and they are in the post table content column and it is not updated.
While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.
As I understand issue also happens in the default language, can you please confirm if you have the same issue when wpml is disabled and you import in the default language? If yes, then this is not a WPML issue, and you should contact WP All Import for support and further info on how to achieve what you are trying.
<?php
/**
* Converts specific special characters in a string to Unicode escape sequences,
* and shows where newlines and carriage returns should be.
*
* @param string $text The input text to convert.
* @return string The text with special characters replaced by Unicode escape sequences.
*/
function convert_special_chars_to_unicode($text) {
// Define an array of special characters to replace with their Unicode escape sequences
$replacements = array(
' '\\\u003c',
'>' => '\\\u003e',
'"' => '\\\u0022',
"'" => '\\\u0027',
'{' => '\\\u007b',
'}' => '\\\u007d',
'&' => '\\\u0026',
'\\' => '\\\\\\u005c'
);
// Initialize the result string
$escaped_text = '';
$length = mb_strlen($text, 'UTF-8');
// Process the text
for ($i = 0; $i
Used it like this for the custom block ->
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.