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:
- Back up your website files and database.
- 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 );