Please make sure to update to WPML 4.3.5 and check our list of Known Issues before reporting

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 4 replies, has 2 voices.

Last updated by jin woo 5 years, 10 months ago.

Assigned support staff: Dat Hoang.

Author Posts
January 24, 2014 at 3:27 am #326880

jin woo

Hello,

We are developing a theme and I need an option to show a custom post in all of langages.

There is a custom post-type which needs to show in all of languages. There is a front end posting page (the custom post type) which users can post by themselves. there are already 2000 custom posts. These need to be showing (listing or displaying) in all of languages.

I have searched and found that I need to do duplicate all of custom posts. but for over 2000 posts, it takes time and It's not good idea to duplicate every each time whenever users post.

Is there any way to show a custom post type without duplication? like share all of languages.

I am not sure if I have given you enough description.
for example, we have "English Lessons" and 2 WPML languages.
The content (posts) has to be in English. because there are English lessons. so the WPML languages are not matter for the posts. (WPML needs for others such as login, register, menu names.. they are working ok.)

Actually 2 custom post types should be displaying all of languages.
How can I make it show these 2 custom posts to show in all of languages? any instruction or API for it?

Btw, what's different between translate and duplicate (or independent ...)? I read and trying to understand but not clear.

Thanks for your time again,

January 24, 2014 at 11:07 am #327120

Dat Hoang

Hello,

I've consulted our team and got some info for you:

A WordPres query will allow plugins like WPML to apply filters if it has the 'suppress_filters' => false parameter set.

You will want to use query_posts if you are altering the main loop: http://codex.wordpress.org/Function_Reference/query_posts
or
if you are creating a secondary loop create a new instance of WP_Query: http://codex.wordpress.org/Function_Reference/query_posts#Secondary_Loops

So, for you need, you don't want to use this filter, so use

'suppress_filters' => true

in the arguments to do query for custom post type.
Thanks.

January 25, 2014 at 6:50 am #327511

jin woo

Thanks for your answer and time..I added " 'suppress_filters' => true" it works good. but there is a problem with single posts.

There is only duplicated posts are available to switch languages.

is there any solution for single posts to be translated?

as you may know, the contents don't need to be translated, but other menus, buttons need to be translated with wpml.

Thanks again,

January 27, 2014 at 7:55 am #328000

Dat Hoang

Hello,

Yes, that's right. The trick

'suppress_filters' => true

only to display all posts in all languages. But for specific posts, it does not affect at all because each post has language information. All other elements (widget, theme text, theme option...) and content will be displayed according to the post/page language information.

Therefore, we do not have complete solution for your need. The only way is duplicating your posts into 2nd (3rd, 4th...) language.

Thank you.

January 27, 2014 at 8:56 am #328043

jin woo

ok Thanks, we will start duplicate.