WPML translation: all languages posts are showing
-
Hi,
I’m using WPML multilingual plugin and the Archives widget is showing posts of all language versions (ENG and ITA). Though both posts versions links point to the correct language version of the website, I would like to display only the archive of the current language.I have enabled the debug info and as you can see the first 2 posts are translations of the same post and they are assigned to the correct “interviews” (interviste) category.
How can I set it up to show only posts of the current language?
https://www.theblacklipstick.com/
MySQL server version: collapsArch options: Array ( [title] => Archives [noTitle] => [inExcludeCat] => exclude [inExcludeCats] => [inExcludeYear] => exclude [inExcludeYears] => [showPages] => [sort] => DESC [linkToArch] => [showYearCount] => 1 [expandCurrentYear] => 1 [expandMonths] => 1 [expandYears] => 1 [expandCurrentMonth] => [showMonthCount] => 1 [showPostTitle] => 1 [expand] => 2 [showPostDate] => [debug] => 1 [postDateFormat] => m/d [postDateAppend] => after [accordion] => 0 [useCookies] => 1 [post_type] => post [taxoncmy] => category [postTitleLength] => [showPostCount] => 1 [style] => custom [archSortOrder] => DESC [showPosts] => [customExpand] => [customCollapse] => [taxonomy] => both [number] => 2 ) POST QUERY: SELECT wp_terms.slug, wp_posts.ID, wp_posts.post_name, wp_posts.post_title, wp_posts.post_author, wp_posts.post_date, YEAR(wp_posts.post_date) AS 'year', MONTH(wp_posts.post_date) AS 'month' , wp_posts.post_type FROM wp_posts LEFT JOIN wp_term_relationships ON wp_posts.ID = wp_term_relationships.object_id LEFT JOIN wp_term_taxonomy ON wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id LEFT JOIN wp_terms ON wp_terms.term_id = wp_term_taxonomy.term_id WHERE post_status='publish' AND wp_posts.post_type='post' GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC POST QUERY RESULTS Array ( [0] => stdClass Object ( [slug] => interviste [ID] => 205 [post_name] => nuovo-post [post_title] => nuovo post [post_author] => 1 [post_date] => 2016-02-09 12:44:08 [year] => 2016 [month] => 2 [post_type] => post ) [1] => stdClass Object ( [slug] => interviews [ID] => 203 [post_name] => nuovo-post-di-test [post_title] => nuovo post di test [post_author] => 1 [post_date] => 2016-02-09 12:43:59 [year] => 2016 [month] => 2 [post_type] => post ) [2] => stdClass Object ( [slug] => outfit-it [ID] => 162 [post_name] => ultimo-post-fashion-blog [post_title] => Ultimo post fashion blog [post_author] => 1 [post_date] => 2016-02-09 12:32:50 [year] => 2016 [month] => 2 [post_type] => post ) [3] => stdClass Object ( [slug] => post-format-gallery [ID] => 170 [post_name] => e-natale-articolo-con-foto-gallery [post_title] => E' Natale - Articolo con foto Gallery [post_author] => 1 [post_date] => 2016-02-09 12:27:20 [year] => 2016 [month] => 2 [post_type] => post ) [4] => stdClass Object ( [slug] => fashion-food-it [ID] => 168 [post_name] => e-tempo-di-mangiare [post_title] => E' tempo di mangiare [post_author] => 1 [post_date] => 2016-02-09 12:26:25 [year] => 2016 [month] => 2 [post_type] => post ) [5] => stdClass Object ( [slug] => outfit-it [ID] => 166 [post_name] => articolo-con-foto-aggiunte-allinterno [post_title] => Articolo con foto aggiunte all'interno [post_author] => 1 [post_date] => 2016-02-09 12:25:54 [year] => 2016 [month] => 2 [post_type] => post ) [6] => stdClass Object ( [slug] => outfit [ID] => 54 [post_name] => last-post-fashion-blog [post_title] => Last post fashion blog [post_author] => 1 [post_date] => 2016-02-01 14:46:29 [year] => 2016 [month] => 2 [post_type] => post ) [7] => stdClass Object ( [slug] => outfit [ID] => 45 [post_name] => post-with-photos-within-it [post_title] => Post with photos within it [post_author] => 1 [post_date] => 2016-01-12 14:39:53 [year] => 2016 [month] => 1 [post_type] => post ) [8] => stdClass Object ( [slug] => fashion-food [ID] => 43 [post_name] => its-time-to-eat [post_title] => It's time to eat [post_author] => 1 [post_date] => 2016-01-05 13:32:51 [year] => 2016 [month] => 1 [post_type] => post ) [9] => stdClass Object ( [slug] => blogroll [ID] => 1 [post_name] => hello-world [post_title] => Hello world! [post_author] => 1 [post_date] => 2015-12-26 16:51:17 [year] => 2015 [month] => 12 [post_type] => post ) [10] => stdClass Object ( [slug] => outfit [ID] => 38 [post_name] => xmas-time-post-gallery [post_title] => Xmas time - post gallery [post_author] => 1 [post_date] => 2015-11-29 13:28:52 [year] => 2015 [month] => 11 [post_type] => post ) )
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘WPML translation: all languages posts are showing’ is closed to new replies.