Title: [Plugin: WPML Multilingual CMS] Problem using the icl_object_id function
Last modified: August 19, 2016

---

# [Plugin: WPML Multilingual CMS] Problem using the icl_object_id function

 *  [TheDailyDG](https://wordpress.org/support/users/thedailydg/)
 * (@thedailydg)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wpml-multilingual-cms-problem-using-the-icl_object_id-function/)
 * Hi all, I also posted a similar message on WPML’s own forum, but maybe the kind
   people of the WP community can give this a look. ;-D
 * Here goes:
 * My theme has featured categories that I’ve made an important part of the home
   page (www.diegograglia.net). But the names of those categories are not showing
   translated on the Spanish version. See the second tier columns on es.diegograglia.
   net (“storytelling”, “web publishing”, “hard news”).
 * I carefully (I think) read [http://wpml.org/documentation/support/creating-multilingual-wordpress-themes/language-dependent-ids/](http://wpml.org/documentation/support/creating-multilingual-wordpress-themes/language-dependent-ids/)
   
   and also consulted: [http://forum.wpml.org/topic.php?id=188](http://forum.wpml.org/topic.php?id=188)
 * I think I’m pretty close to the solution, after adding the code below to functions.
   php as per Amir’s suggestion on the forum.
 * function lang_category_id($id){
    if(function_exists(‘icl_object_id’)) { return
   icl_object_id($id,’category’,true); } else { return $id; }
 * What I’m having trouble with is the right call to the function. Here’s how my
   theme calls for that headline on featured3.php:
 * <h2><?php echo $featuredpostscatname3;?></h2>
 * As you may have guessed by now, I’m a noob on php matters. Although I tried many
   combinations, I cannot get the right syntax to have it display the translation.
 * Could anyone point me in the right direction? Big thanks in advance.

The topic ‘[Plugin: WPML Multilingual CMS] Problem using the icl_object_id function’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sitepress-multilingual-cms.svg)
 * [WPML Multilingual CMS](https://wordpress.org/plugins/sitepress-multilingual-cms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sitepress-multilingual-cms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sitepress-multilingual-cms/)
 * [Active Topics](https://wordpress.org/support/plugin/sitepress-multilingual-cms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sitepress-multilingual-cms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sitepress-multilingual-cms/reviews/)

## Tags

 * [category i.d's](https://wordpress.org/support/topic-tag/category-i-ds/)

 * 0 replies
 * 1 participant
 * Last reply from: [TheDailyDG](https://wordpress.org/support/users/thedailydg/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wpml-multilingual-cms-problem-using-the-icl_object_id-function/)
 * Status: not resolved