[Resolved] Html in ACF fields (product), instead of rendered text.
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing issues with HTML not rendering correctly in translated pages of ACF fields on your site, where HTML code is visible instead of being rendered as text, particularly when using the Divi theme. Solution: We recommend adding the following code to your theme's functions.php file and then re-translate the affected page:
// WPML workaround for compsupp-7001
add_filter('do_shortcode_tag', 'wpml_compsupp7001_decode_et_pb_button_text', 10, 4);
function wpml_compsupp7001_decode_et_pb_button_text($output, $tag, $attr, $m) {
if ( class_exists('Sitepress') && 'et_pb_accordion_item' === $tag && isset($attr['title'])) {
// Decode both the ampersand and the apostrophe
$output = html_entity_decode($output, ENT_QUOTES, 'UTF-8');
}
return $output;
}
This solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Background of the issue:
I am trying to render HTML in ACF fields for translated product pages on my site hidden link. The HTML is rendered correctly in the Italian version (instead of .... I can see the table), which is the original, but not in the translated pages where I can see the code. The problem affects all codes, also youtube embed code.
Symptoms:
HTML code is visible on translated pages instead of being rendered as text.
Questions:
Why is the HTML not rendering in the translated pages?
How can I ensure that HTML is rendered correctly in all languages?
- Please backup the site files and database before providing us access.
- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.
Strange things are occurring on my website now. I guess it's you working. Well, just for you to know, theme builder is no longer loading filters in the product category pages (that work as a shop > you can access from prodotti - products), sometimes links redirect wrong and the site is very, very slow.
I'm working for removing premmerce, so we have less issue on the website (just for you to know). When you'll be finished, I will remove Premmerce, if I manage writing a good htaccess that recover the correct links without losing google ranking.
Thanks for help, it's really appreciated.
I wait forward for your feedback.