This thread is resolved. Here is a description of the problem and solution.
Problem:
Latest Feed, Activity and some other BuddyPress pages show all languages in one go without separation between the langauegs
Solution:
There is a workaround that can be used but it will be a temporary one and it seems that it breaks the pagination but it works as a temporary solution:
// Filter the activity feed by the language: // 1. buffer the activity entry output... add_action('bp_before_activity_entry', function () { ob_start(); }); // 2. clean the output if the activity is the post activity and languages don't match, // flush otherwise. add_action('bp_after_activity_entry', function () { $get_lang = $_GET['lang']; $language_code = get_activity_post_language_code(); if ( $language_code && $get_lang && $language_code !== $get_lang ) { ob_end_clean(); } else { ob_end_flush(); } }); function get_activity_post_language_code() { if ( ! bp_get_activity_secondary_item_id() ) { return false; } $language_details = apply_filters( 'wpml_post_language_details', NULL, bp_get_activity_secondary_item_id() ); if ( ! $language_details ) { return false; } return $language_details['language_code']; }
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 17 replies, has 2 voices.
Last updated by 11 months ago.
Assisted by: Christopher Amirian.