For the time being, I am using the following workaround:
in skin-custom.php
change this code
$templates = $wpdb->get_results(
"SELECT $wpdb->term_relationships.object_id as ID, $wpdb->posts.post_title as post_title FROM $wpdb->term_relationships
INNER JOIN $wpdb->term_taxonomy ON
$wpdb->term_relationships.term_taxonomy_id=$wpdb->term_taxonomy.term_taxonomy_id
INNER JOIN $wpdb->terms ON
$wpdb->term_taxonomy.term_id=$wpdb->terms.term_id AND $wpdb->terms.slug='loop'
INNER JOIN $wpdb->posts ON
$wpdb->term_relationships.object_id=$wpdb->posts.ID"
);
to this
if (ICL_LANGUAGE_CODE == "ar") {
$templates = $wpdb->get_results(
"SELECT $wpdb->term_relationships.object_id as ID, $wpdb->posts.post_title as post_title FROM $wpdb->term_relationships
INNER JOIN $wpdb->term_taxonomy ON
$wpdb->term_relationships.term_taxonomy_id=$wpdb->term_taxonomy.term_taxonomy_id
INNER JOIN $wpdb->terms ON
$wpdb->term_taxonomy.term_id=$wpdb->terms.term_id AND $wpdb->terms.slug='loop-ar'
INNER JOIN $wpdb->posts ON
$wpdb->term_relationships.object_id=$wpdb->posts.ID"
);
}
else {
$templates = $wpdb->get_results(
"SELECT $wpdb->term_relationships.object_id as ID, $wpdb->posts.post_title as post_title FROM $wpdb->term_relationships
INNER JOIN $wpdb->term_taxonomy ON
$wpdb->term_relationships.term_taxonomy_id=$wpdb->term_taxonomy.term_taxonomy_id
INNER JOIN $wpdb->terms ON
$wpdb->term_taxonomy.term_id=$wpdb->terms.term_id AND $wpdb->terms.slug='loop'
INNER JOIN $wpdb->posts ON
$wpdb->term_relationships.object_id=$wpdb->posts.ID"
);
}
Replace ar with your lang code. Notice that you have to change it on 2 instances.
Hope this help.
-
This reply was modified 7 years ago by
wphussain.
-
This reply was modified 7 years ago by
wphussain.
I tried for spanish:
if (ICL_LANGUAGE_CODE == "es") {
$templates = $wpdb->get_results(
"SELECT $wpdb->term_relationships.object_id as ID, $wpdb->posts.post_title as post_title FROM $wpdb->term_relationships
INNER JOIN $wpdb->term_taxonomy ON
$wpdb->term_relationships.term_taxonomy_id=$wpdb->term_taxonomy.term_taxonomy_id
INNER JOIN $wpdb->terms ON
$wpdb->term_taxonomy.term_id=$wpdb->terms.term_id AND $wpdb->terms.slug='loop-es'
INNER JOIN $wpdb->posts ON
$wpdb->term_relationships.object_id=$wpdb->posts.ID"
);
}
else {
$templates = $wpdb->get_results(
"SELECT $wpdb->term_relationships.object_id as ID, $wpdb->posts.post_title as post_title FROM $wpdb->term_relationships
INNER JOIN $wpdb->term_taxonomy ON
$wpdb->term_relationships.term_taxonomy_id=$wpdb->term_taxonomy.term_taxonomy_id
INNER JOIN $wpdb->terms ON
$wpdb->term_taxonomy.term_id=$wpdb->terms.term_id AND $wpdb->terms.slug='loop'
INNER JOIN $wpdb->posts ON
$wpdb->term_relationships.object_id=$wpdb->posts.ID"
);
}
With no success, am I missing something?
TIA
I don’t have a WPML license so I can’t say how it would properly work, but in polylang I have 2 archive pages for example and you I make a custom skin for each language.
Thanks everybody!
Issue fixed.
Update the latest version!