Thanks for reporting this, @airathalitov
We’ll check this issue with BP developers.
So, what’s new about this bug?
Hi Airat,
We have tried WPGlobus + BP on a couple of themes and could not reproduce the problem you are having.
Here, for instance, what we see on Storefront theme
http://take.ms/ldzTi
http://take.ms/YFL9t
http://take.ms/J1a7h
As you may see, the headings are correct.
Ok, I will test this problem on my test server.
What about second question?
How translate profile fields on BuddyPress?
At this moment, we do not have a solution for BP extended profile fields. The plugin is very large and complicated.
Maybe if we had many requests, or if someone was willing to sponsor the development, we could dedicate time to it.
@tivnetinc
Page title issue is related with Boss theme (not with plugins).
Can you check it?
Sorry Airat, we are not able to check specific theme issues. If you locate a specific place in their code, we can take a look.
Thanks for understanding
Can you check this function
/*
* Get title on dir pages
*
* @since Creacial 1.0.0
*/
function buddyboss_page_title() {
echo buddyboss_get_page_title();
}
function buddyboss_get_page_title() {
global $bp;
if ( bp_is_directory() ) {
foreach ( (array) $bp->pages as $page_key => $bp_page ) {
if ( $bp_page->slug == bp_current_component() || ($bp_page->slug == 'sites' && bp_current_component() == 'blogs') ) {
$page_id = $bp_page->id;
$page_query = new WP_query( array(
'post_type' => 'page',
'page_id' => $page_id
) );
$output_page = get_post( $page_id );
$custom_title = $output_page->post_title;
}
}
}
$pattern = '/([\s]*| )<a/im';
$bp_title = '';
$bp_title = get_the_title();
// If we have a custom title and need to grab a BP title button
if ( ! empty( $custom_title ) && (int) preg_match( $pattern, $bp_title ) > 0 ) {
$token = md5( '#b#u#d#d#y#b#o#s#s#' );
$bp_title_parsed = preg_replace( $pattern, $token, $bp_title );
$bp_title_parts = explode( $token, $bp_title_parsed, 2 );
$custom_title .= ' <a' . $bp_title_parts[ 1 ];
}
if ( empty( $custom_title ) ) {
$custom_title = $bp_title;
}
return $custom_title;
}
add_action('wp_head', 'bb_check_page_template');
function bb_check_page_template(){
if ( is_page_template( 'page-boxed.php' ) ) {
add_filter( 'boss_redux_option_value', 'boss_filter_layout', 10, 3 );
}
}
-
This reply was modified 9 years, 6 months ago by
AiratTop.
I would try changing
$custom_title = $output_page->post_title;
to
$custom_title = apply_filters( 'the_title', $output_page->post_title );
However, I am not sure what are they doing there with their “token”.
Good!
Your solution is working with page header (<h1> attribute), but page title still looks like {:ru}Группы{:}{:en}Groups{:} (<title> attribute).
It’s the same story. In each place in the code where they use ->post_title, filtering should be applied. Not only because of WPGlobus. Using unfiltered data should be reserved for admin area only. At the front, everything should be filtered and then – escaped.