• I’m using Arthemia Premium and WPML 1.8.3. I can’t get support for the free version of WPML and can’t get an answer from support for Arthemia Premium. And I’m just clueless and hope someone can help.

    I’m using the category ID in index.php to display posts from one category on a bilingual site http://cirkus.site88.com

    Default language is Croatian and the posts in the 2-collumn post list in index page are from the specified category.

    When I switch to the English site, WPML doesn’t hook this and the post list in English is not visible (though, other translated posts on the index page are).

    This is the code:

    <?php
    global $myOffset;
    $myOffset = 1;
    $temp = $wp_query;
    $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
    $wp_query= null;
    $wp_query = new WP_Query();
    $wp_query->query(array(
    ‘paged’ => $paged,
    ‘offset’ => $myOffset,
    ‘category__not_in’ => array($ar_headline,$ar_featured),
    ‘post__not_in’ => get_option( ‘sticky_posts’ ),
    ‘ignore_sticky_posts’ => 1,
    ‘cat’=> icl_object_id(185,’category’, true)
    )); ?>

    the function is:

    function lang_category_id($id){
              if(function_exists('icl_object_id')) {
                return icl_object_id($id,'category',true);
              } else {
                return $id;
              }
            }

    If I remove the ‘cat’ line, the English posts (from any categories) appear. So obviously, I’m doing it wrong with the icl_object_id.

    Any help is much appreciated.
    (sorry if i posted this in the wrong place, i’m a newbie)

  • The topic ‘[Plugin: WPML] Translated posts from category not visible’ is closed to new replies.