跳过导航

Open

Overview of the issue

When you use Cornerstone plugin (or PRO theme), custom CSS/JS from the original language is copied to the translated pages if WPML Media Translation plugin is active.

Workaround

To fix this issue on your site and be able to have different custom CSS/JS on the translated pages, please follow these steps:

  1. Back up your website files and database.
  2. Add this code snippet to your theme’s functions.php file:
    function wpml_compsupp_5527_wpml_pb_copy_meta_field( $value, $translated_post_id, $original_post_id, $meta_key ) {
        if ( '_cornerstone_settings' === $meta_key ) {
            return WPML_PB_Handle_Custom_Fields::slash_json( get_post_meta( $translated_post_id, $meta_key, true ) );
        }
        return $value;
    }
    add_filter( 'wpml_pb_copy_meta_field', 'wpml_compsupp_5527_wpml_pb_copy_meta_field', 10, 4 );
    

留下回复

紧扣主题并尊重他人。如果您需要帮助解决与本帖无关的问题,请使用我们的 Support Forum 开始聊天或提交票据。

您可以使用这些标签:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>