This user has no favorite topics.
Favorite Forum Topics
Forum Topics Created
Status |
Topic
|
Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Buddyboss Profile Types Field Bug
Started by: arthurS-22
in: English Support
Problem: // WPML Workaround for compsupp-6144 add_filter( 'bp_get_the_profile_field_value', 'wpml_compsupp6144_translate_buddypress_profile_fields', 10, 3 ); function wpml_compsupp6144_translate_buddypress_profile_fields( $value, $type, $id ) { if ($type == 'textbox' || $type == 'wp-textbox' || $type == 'wp-biography' || $type == "membertypes") { //remove html tags from value and limit it's size, so we can use it as string name $filtered_value = substr(strip_tags($value), 0, 60); // register string if ( apply_filters('wpml_default_language', NULL ) == apply_filters( 'wpml_current_language', NULL )) { do_action( 'wpml_register_single_string', 'BuddyPress Profile Fields', $type.' - '.$filtered_value , $value ); } //translate string $value = apply_filters('wpml_translate_single_string', $value, 'BuddyPress Profile Fields', $type.' - '.$filtered_value ); } return $value; } 3. Open the profile page on the front-end to view and register the fields. If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket. |
2 | 15 | 2 months, 1 week ago | ||
Get Buddypress profile field’s translated data
Started by: arthurS-22
in: English Support
Problem: wpml_translate_single_string hook instead of the wpml_object_id filter, as the latter is intended for filtering post types by ID. Here is how you can modify your code: function render_member_header() {<br /> $expertise = xprofile_get_field_data('My Offer', bp_displayed_user_id(), 'comma');<br /> echo '<span>'. apply_filters('wpml_translate_single_string', $expertise, 'context', 'name') .'</span>';<br />}<br />add_action('bp_before_member_header_meta', 'render_member_header'); For more details on using this hook, please visit wpml_translate_single_string documentation. If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. Also, check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum. |
2 | 7 | 3 months ago |