Title: ikarus7's Replies | WordPress.org

---

# ikarus7

  [  ](https://wordpress.org/support/users/ikarus7/)

 *   [Profile](https://wordpress.org/support/users/ikarus7/)
 *   [Topics Started](https://wordpress.org/support/users/ikarus7/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ikarus7/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ikarus7/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ikarus7/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ikarus7/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ikarus7/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[qTranslate X] the_archive_title() showing all languages for custom post type category archive](https://wordpress.org/support/topic/the_archive_title-showing-all-languages-for-custom-post-type-category-archive/)
 *  Thread Starter [ikarus7](https://wordpress.org/support/users/ikarus7/)
 * (@ikarus7)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/the_archive_title-showing-all-languages-for-custom-post-type-category-archive/#post-8583389)
 * Looks like I found a workaround for this. Seems like `the_archive_title()` function
   isn’t triggering the qTranslate filter, so rather than calling this function,
   we can manually apply the filter instead using `__( ... )` as described in the
   [qTranslate start up guide](https://qtranslatexteam.wordpress.com/faq/#CustomFields).
 * So taking this scenario, I use `get_the_archive_title()` instead:
    `<?php echo
   __( get_the_archive_title() ); ?>`
 * This will now output only the right translation, however, do make sure that the
   custom post type category’s **labels** are declared for each language too. i.
   e. [:en]Category[:aa]title1[:bb]title2[:]. Otherwise, the “Category: (term)” 
   output on `get_the_archive_title()` will only output whatever language it is 
   declared for.
    -  This reply was modified 9 years, 4 months ago by [ikarus7](https://wordpress.org/support/users/ikarus7/).
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Fetching post content from all top-level terms in a custom taxonomy](https://wordpress.org/support/topic/fetching-post-content-from-all-top-level-terms-in-a-custom-taxonomy/)
 *  Thread Starter [ikarus7](https://wordpress.org/support/users/ikarus7/)
 * (@ikarus7)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/fetching-post-content-from-all-top-level-terms-in-a-custom-taxonomy/#post-2946535)
 * Thanks ChaseWiseman, that works well!
 * What I’ve done is slotted this query inside the foreach( $types as $type ) loop:
 *     ```
       $query_args = array(
       	'orderby' => 'title',
       	'order' => 'ASC',
       	'post_type' => 'products',
       	'posts_per_page' => 4,
       	'tax_query' => array(
       		// query the product_type using the current type's slug and only fetch parent items
       		array(
       			'taxonomy' => 'product_type',
       			'field' => 'slug',
       			'terms' => $type->slug,
       			'include_children' => false
       		)
       	));
       $type_query = new WP_Query( $query_args );
       ```
   
 * That fetches my required posts and I can then extract data from each post from
   there. This does exactly what I need it to do. Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)