I'm almost complete whit my wp theme an I'm now translating it with the WPML plugin. This is working out great (even all my custom post types and meta boxes :) ), but of course there have to be a problem.
I have added meta boxes to one specific page and have target it like this:

Hi thanks for answering :), can you please show (in a context with; if ($post_id == '17') ) what you mean (I only get error)? You see, this is only my second wp theme and the first one using meta boxes and custom post types, so I'm kinda confused how to implement this! And how do I use get_query_var() in the code I've already have, and would changing this mess up my meta boxes with content?
–
ElisabethOct 19 '11 at 18:13

3 Answers
3

Use the icl_object_id function of WPML. It will resolve automatically the id depending of the current language.

Another option and IMO much more reliable one would be to do the check based on the slug of the page. It would cover you in the case you accidentally deletes the post/page concerned. With an ID check you would be forced to go and edit the code source again, with a slug check you'd only have to recreate a page with the same slug. Just my 2 cents though.

Thank you so much for answering :). Can you show an sample of what you have in mind, how would you write this code? I'm still pretty new to everything WP (but I'm learning a elephant everyday) so good samples is my savior!
–
ElisabethOct 19 '11 at 18:23

I don't have much time now to show a code example. Basically, all you need to do is here.
–
Jonathan LiutiOct 19 '11 at 21:35