Tagged: x
-
AuthorPosts
-
February 24, 2017 at 6:33 am #1384194
Hello,
I have a site with WPML, with 4 languages.
We have serveral corporate pages translated in each language, but we don’t want to translate or duplicate the posts, the posts are going to be just in english.I know I can “duplicate” every post in every language, but I think it’s cleaner to use the option “show all post (show default language post if not translated)”, but it doesn’t work, when I select this option I get “Nothing to show right now” in the Blog page of not default language, and an empty list where I use the “Recent Posts” widget.
Is there a way to make it work in this way (not duplicating every post)?
thank you
February 24, 2017 at 10:38 am #1384397Hi again,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
March 1, 2017 at 2:32 pm #1390872This reply has been marked as private.March 1, 2017 at 11:09 pm #1391413Hi there,
Would you mind providing your login credentials as well? I’d like to test your settings 🙂
For the meantime, you may contact WPML support about this setting.
Thanks!
March 7, 2017 at 5:08 am #1397541This reply has been marked as private.March 7, 2017 at 8:57 pm #1398577Hello There,
Thank you for the credentials. That is how it works by default. The query will just display the post for the current language. What you want to achieve will need some customization. Try adding this code on your child theme’s functions.php file.
function wpml_custom_query( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'suppress_filters', 'true' ); } } add_action( 'pre_get_posts', 'wpml_custom_query' );
See this link too:https://wpml.org/forums/topic/display-all-blog-posts/
March 16, 2017 at 5:22 am #1409383Hello,
I tested that solution, but it’s a partial solution provided that with that code, when you are in english web version and you see a spahish post in the list, then you clic in that post, and then it changes your web interface language to spanish, because the link to the post is the link to the post in that language for the website interface. So it makes the user jumping language to language, very bad.
For the moment we are duplicating every post i every language.
thx
March 16, 2017 at 2:26 pm #1410049Hi there,
It’s WPML standard to duplicate posts to their specific language. There is no automatic translation for content, it has to be done manually.
Thanks.
March 28, 2017 at 1:22 pm #1423285Hi Lely. I’m having the same issue as llribas, where visiting the blog page in a language other than English doesn’t display any blog posts.
I’ve added the code you mentioned above, and that did display my English posts in the other languages, but it doesn’t display the archives widget.
So English users see all the posts, and can jump to a specific month using the Archives Widget. Other languages see the posts, but the archives widget doesn’t display.
March 29, 2017 at 3:09 pm #1424560Hi Mike,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
And please check this https://community.theme.co/forums/topic/welcome-to-the-general-forum-please-read-this-first/, make sure to submit tickets through this https://community.theme.co/support/.
Thanks!
March 29, 2017 at 3:26 pm #1424584This reply has been marked as private.March 29, 2017 at 11:59 pm #1424977Hi there,
You don’t have translated posts assigned to the translated category. Example, if you go to Admin > Posts > Categories and select French, you’ll see the Nouvelles category and it doesn’t have any posts (0 counts). The widget will only display categories that have posts on it.
And to confirm it, go to Admin > Posts and switch to French, there is no French posts either, which also makes no posts for French category.
As I mentioned above,
It’s WPML standard to duplicate posts to their specific language. There is no automatic translation for content, it has to be done manually.
Example, you have to duplicate an English post into a French post, and assign that French post to a French category.
Thanks.
March 30, 2017 at 8:58 am #1425309The posts haven’t been translated due to the cost of doing so would be prohibitive for my client. WPML has a feature where they’ll show untranslated blog posts (WPML > Languages >
Blog posts to display) but it appears that the X Theme isn’t compatible with that feature.Using the php above the blog posts display, is there any way I can get the Category Archives widget to work as well?
March 30, 2017 at 11:21 pm #1425952Hi there,
It’s not possible, those widgets are part of WordPress itself and filtered by WPML. You may want to contact WPML author in this case.
Thanks!
-
AuthorPosts