Open herrvigg opened 6 years ago
Comment by herrvigg
Wednesday Aug 30, 2017 at 17:23 GMT
What do you mean by "if current language available" ?
qTranslate-X adds a hook called "qtranxf_postsFilter" on "the_posts" filter and translates stuff from this. If you have other criterions you could also manage them with meta fields.
You can also check the qtranxf_where_clause_translated_posts
and maybe customize some filter there.
My website have 2 language. I have custom query. How do I get post if current language available ?
$args = array( 'post_type' => 'wpdmpro', 'posts_per_page'=> 10, 'paged' => $paged, 'tax_query' => array( 'relation' => 'AND', array( 'taxonomy' => 'wpdmcategory', 'field' => 'id', 'terms' => $category_id, ) ) );
query_posts($args);
Thanks & Regards