Hey there,
I wrote a solution, if you are interested in…
I created this function below and replaced all the get_terms
with it in the remove-taxonomy-base-slug.php file.
Refresh the permalinks structure and voilá!
It doesn’t modify anything else, but only adds support for WPML.
It would be nice if you consider adding this to the next update of the plugin.
Maybe you could improve it even more. Anyway, it’s working like a charm here until now.
function rtbs_get_all_terms( $taxonomy = 'category', $args = array( 'hide_empty' => false ) ) {
$terms = get_terms( $taxonomy, $args );
if ( function_exists( 'icl_get_languages' ) ) {
$languages = icl_get_languages();
if ( 1 < count( $languages ) ) {
foreach ( $languages as $l ) {
$language_code = $l['language_code'];
if ( ICL_LANGUAGE_CODE != $language_code ) {
foreach ( $terms as $t ) {
$id = icl_object_id( $t->term_id, $taxonomy, false, $language_code );
if ( null !== $id )
$ids[] = $id;
}
}
}
if ( is_array( $ids ) && 1 <= count( $ids ) ) {
global $wpdb;
$ids = implode( ',', $ids );
$results = $wpdb->get_results(
"
SELECT * FROM $wpdb->terms
WHERE term_id IN ($ids)
"
);
$terms = array_merge( $terms, $results );
}
}
}
return $terms;
}