ข้ามการนำทาง

Open

Topic Tags: Compatibility

Overview of the issue

When using the Enfold theme, XML code inserted into a code block (via the code element) appears correctly in the main language. However, in translated posts, the XML code is stripped out.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open …/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Enfold/class-wpml-compatibility-theme-enfold.php file.
  • Look for line 45.
  • Just after:
    		if ( wp_is_post_revision( $post_id ) ) {
    			return;
    		}
    
  • Add the following code:
    		// Check if the post content contains an Enfold Code Block.
    		if ( strpos( $post->post_content, '[av_codeblock' ) !== false ) {
    			// Skip processing if Enfold Code Block is detected.
    			return;
    		}
    

ทิ้งคำตอบไว้

โปรดอยู่ในหัวข้อและเคารพผู้อื่น หากคุณต้องการความช่วยเหลือเกี่ยวกับปัญหาที่ไม่เกี่ยวข้องกับโพสต์นี้ โปรดใช้ฟอรัมสนับสนุนของเราเพื่อเริ่มการสนทนาหรือส่งตั๋ว.

คุณสามารถใช้แท็กเหล่านี้:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>