{"id":3046349,"date":"2012-09-15T06:50:10","date_gmt":"2012-09-15T06:50:10","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/list-category-posts-qtranslate\/"},"modified":"2016-08-20T15:41:24","modified_gmt":"2016-08-20T15:41:24","slug":"list-category-posts-qtranslate","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/list-category-posts-qtranslate\/","title":{"rendered":"List Category Posts   qTranslate"},"content":{"rendered":"<p>Make List Category Posts 0.24 play nice with qTranslate &#8211; September 2012<\/p>\n<pre><code>\/\/ Custom Function UPDATE 2012-Sept-15 CatListDisplayer.php\n\t\tprivate function get_post_title($single, $tag = null, $css_class = null){\n\t\t\tif (function_exists(&#039;qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage&#039;)) {\n        \t\t\t$title = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($single-&gt;post_title);\n\t\t\t\t$info = &#039;&lt;a href=&quot;&#039; . get_permalink($single-&gt;ID) .\n\t\t\t\t\t&#039;&quot; title=&quot;&#039;. $title . &#039;&quot;&gt;&#039; .\n\t\t\t\t\t$title . &#039;&lt;\/a&gt;&#039;;\n\t\t\t} else {\n\/\/ This is the original code in get_post_title (plus the return statement)\n\t\t\t\t$info = &#039;&lt;a href=&quot;&#039; . get_permalink($single-&gt;ID) .\n\t\t\t\t\t&#039;&quot; title=&quot;&#039;. $single-&gt;post_title . &#039;&quot;&gt;&#039; .\n\t\t\t\t\t$single-&gt;post_title . &#039;&lt;\/a&gt;&#039;;\n\t\t\t}\n\t\t\t\treturn $this-&gt;assign_style($info, $tag, $css_class);\n\t\t}<\/code><\/pre>\n<p>The solutions posted here:<br \/>\nhttps:\/\/wordpress.org\/support\/topic\/plugin-list-category-posts-qtranslate-issue?replies=6<\/p>\n<p>were a bit outdated for version 0.24 of List Category Posts<\/p>\n","protected":false},"template":"","class_list":["post-3046349","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3046349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3046349\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3046349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}