I just tried translating templates from the cwicly themer with WPML. If I just duplicate it, everything works well. But if I try to translate specific parts (even with string translations) the custom css of the cwicly blocks will get lost. Did anyone have this problem by now or find a solution? I’d just copy paste it in the translated version, but unfortunately WPML does not allow to manually edit templates.
One workaround seems to be to change the default language, manually set up the template and then change the language again. But for future edits this is quite nasty (I know WPML causes too many issues)
We are unfortunately aware of this issue, as it had previously been reported to us.
Rest assured, our team is actively investigating and working on this.
Though we don’t have a specific timeframe of when this might be addressed, we hope to have a fix in the next following weeks.
thank you very much for your awesome support. That’s why I love working with Cwicly. I used the global stylesheets as workaround until now. But this will help a lot to customise single pages in future.
Unfortunately I’m facing a similar Issue with a Site of mine where I had to use the classic editor for one site (so basically GB-Editor for translating the site). Applying custom styles to elements don’t get generated on frontend. It seems like that the translated Page is picking up the original styles. Any Idea why this could happen?
Sorry, and here is a screenshot of the loaded CSS.
The post itself is translated from the Post ID 10, but has the ID 5579 in my case. So it seems that there’s something going on with the enqueueing part of the stylesheets?!
PPS: For all having the same problem. Put this snippet inside of a code block on your page. That’s a quick fix, not really ideal since you’re loading now two stylesheets and you always have to manually place it on the translated site, but for now it’s doing its job:
<?php
function enqueue_translation_styles() {
global $post;
$post_id = $post->ID;
$css_url = content_url("/uploads/cwicly/css/cc-post-{$post_id}.css");
wp_enqueue_style('translation-style', $css_url, array(), null);
}
add_action('wp_enqueue_scripts', 'enqueue_translation_styles');
?>
Looking at this a bit more closely, it seems that what you’re experiencing is the default and expected behaviour with WPML and the Gutenberg implementation.
However, in 1.4.1.4, we have added a filter so that you can switch to loading the current post’s stylesheet instead of the original one.