Title: [Plugin: List category posts] QTranslate Issue
Last modified: August 19, 2016

---

# [Plugin: List category posts] QTranslate Issue

 *  [asplash](https://wordpress.org/support/users/asplash/)
 * (@asplash)
 * [15 years ago](https://wordpress.org/support/topic/plugin-list-category-posts-qtranslate-issue/)
 * Hi,
    I have used this plugin with QTranslate but the listing shows both languages.
   Has anyone got this combination to work? The thread on the plugin website refers
   to code in an earlier version.
 * Thanks in advance, Jane
 * [http://wordpress.org/extend/plugins/list-category-posts/](http://wordpress.org/extend/plugins/list-category-posts/)

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

 *  [muc089](https://wordpress.org/support/users/muc089/)
 * (@muc089)
 * [15 years ago](https://wordpress.org/support/topic/plugin-list-category-posts-qtranslate-issue/#post-2045790)
 * Same Problem to me.
 * All different titles are concatenated to one big title :(.
    Trying to figure 
   out where the catlist does it, or how to speparate the titles as they should 
   be displayed.
 * Thanks hope to get a answer, Adrian
 *  [muc089](https://wordpress.org/support/users/muc089/)
 * (@muc089)
 * [15 years ago](https://wordpress.org/support/topic/plugin-list-category-posts-qtranslate-issue/#post-2045794)
 * Hi could not yet figure out if it works with list-category-posts
    but this is
   a link to some more information about the problem [ Making Plugin **** work with
   qTranslate
 * greets Adrian,
    any hints welcome!!!
 *  [muc089](https://wordpress.org/support/users/muc089/)
 * (@muc089)
 * [15 years ago](https://wordpress.org/support/topic/plugin-list-category-posts-qtranslate-issue/#post-2045795)
 * Hi Asplash,
 * got the solution 😀
 * Just edit your default.php(or your own template) inside the list-category-posts/
   templates folder and replace the line:
 *     ```
       $lcp_display_output .= $this->get_post_title($single);
       ```
   
 * with
 *     ```
       if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
   
               $output = $this->get_post_title($single);
               $lcp_display_output .= qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($output);
   
           } else
           $lcp_display_output .= $this->get_post_title($single);
       ```
   
 * Greets Adrian
    hopes it solves your problem too, Asplash
 *  [tempor](https://wordpress.org/support/users/tempor/)
 * (@tempor)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/plugin-list-category-posts-qtranslate-issue/#post-2045834)
 * Hi,
 * -concerning qtranslate and the new version of List category posts compatibility-
 * in case you don’t wish to use a template you can make these changes directly 
   to CatListDisplayer.php (it affects only the titles):
 * Qtranslate Multilingual Support for List Category Posts Plug
 * find and replace this:
 *     ```
       private function lcp_build_post($single, $tag){
               $lcp_display_output = '<'. $tag . '>' . $this->get_post_title($single);
       ```
   
 * with this:
 *     ```
       private function lcp_build_post($single, $tag){
           if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
   
               $output = $this->get_post_title($single);
               $lcp_display_output .= qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($output);
   
          	 } else
           		$lcp_display_output = '<'. $tag . '>' . $this->get_post_title($single);
       ```
   
 * based on [muc089](http://wordpress.org/support/profile/muc089) solution.
 *  [natterjacks](https://wordpress.org/support/users/natterjacks/)
 * (@natterjacks)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-list-category-posts-qtranslate-issue/#post-2045852)
 * I had the same issue with the “WP Category Post List” and QTranslate plugin and
   was able to fix it with a similar solution, thanks!!!
 * Here’s the solution…..
 * Find the following code in wp-category-post-list.php (you’ll find 2 lines the
   same):
 * `$post_output .= '<a href="' . get_permalink($post->ID) . '" target="' . ((false
   == $instance['open_in'])? '_blank' : '_self') . '">' . $post->post_title . '</
   a>';`
 * Right above that add:
 *     ```
       if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
       $post->post_title = esc_html(qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($post->post_title));
       }
       ```
   
 * Do this for both entries to apply to normal posts and sticky posts.

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

The topic ‘[Plugin: List category posts] QTranslate Issue’ is closed to new replies.

 * ![](https://ps.w.org/list-category-posts/assets/icon-256x256.png?rev=2517221)
 * [List category posts](https://wordpress.org/plugins/list-category-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/list-category-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/list-category-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/list-category-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/list-category-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/list-category-posts/reviews/)

## Tags

 * [solution](https://wordpress.org/support/topic-tag/solution/)
 * [WP Category Post List](https://wordpress.org/support/topic-tag/wp-category-post-list/)

 * 5 replies
 * 4 participants
 * Last reply from: [natterjacks](https://wordpress.org/support/users/natterjacks/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-list-category-posts-qtranslate-issue/#post-2045852)
 * Status: not resolved