WPML
สถานะ
เปิด
ปลั๊กอิน/ธีมที่เกี่ยวข้อง
Oxygen
แท็กหัวข้อ
Compatibility

ภาพรวมของปัญหา

ในบางกรณี คำแปลของเทมเพลต Oxygen Builder แสดงผลไม่ถูกต้องสำหรับผู้เข้าชมที่ไม่ได้เข้าสู่ระบบ

วิธีแก้ปัญหาชั่วคราว

โปรดตรวจสอบให้แน่ใจว่าคุณมีการสำรองข้อมูลทั้งหมดของไซต์ก่อนดำเนินการต่อ และโปรดทราบว่าขณะนี้ Oxygen ยังไม่รองรับการทำงานร่วมกับ WPML


  • ติดตั้งปลั๊กอินอย่าง WP Code และตรวจสอบให้แน่ใจว่าระบบอ่านสนิปเปตเป็นโค้ด PHP

  • เพิ่มสนิปเปตต่อไปนี้:
    add_action( 'init', 'wpml_ct_add_templates_cpt' );
    
    function wpml_ct_add_templates_cpt() {
    
    	$labels = array(
    		'name'               => _x( 'Templates', 'post type general name', 'component-theme' ),
    		'singular_name'      => _x( 'Template', 'post type singular name', 'component-theme' ),
    		'menu_name'          => _x( 'Templates', 'admin menu', 'component-theme' ),
    		'name_admin_bar'     => _x( 'Template', 'add new on admin bar', 'component-theme' ),
    		'add_new'            => _x( 'Add New Template', 'template', 'component-theme' ),
    		'add_new_item'       => __( 'Add New Template', 'component-theme' ),
    		'new_item'           => __( 'New Template', 'component-theme' ),
    		'edit_item'          => __( 'Edit Template', 'component-theme' ),
    		'view_item'          => __( 'View Template', 'component-theme' ),
    		'all_items'          => __( 'Templates', 'component-theme' ),
    		'search_items'       => __( 'Search Templates', 'component-theme' ),
    		'parent_item_colon'  => __( 'Parent Templates:', 'component-theme' ),
    		'not_found'          => __( 'No templates found.', 'component-theme' ),
    		'not_found_in_trash' => __( 'No templates found in Trash.', 'component-theme' )
    	);
    
    	$args = array(
    		'exclude_from_search' => true,
    		'labels'             => $labels,
    		'public'             => true,
    		'publicly_queryable' => true,
    		'has_archive'		 => true,
    		'show_ui'            => true,
    		'show_in_menu'       => 'ct_template',
    		'rewrite' 			 => false,
    		'query_var'          => true,
    		'capability_type'    => 'post',
    		'hierarchical'       => false,
    		'menu_position'      => null,
    		'supports'           => array( 'title' )
    	);
    
    	register_post_type( 'ct_template', $args );
    
    }

  • แปลเทมเพลต Oxygen ของคุณโดยใช้ ตัวแก้ไข WordPress

ปัญหาที่ทราบแล้วทั้งหมด →