-
-
I’ve found an issue when using Tower with BBpress.
The user profile pages don’t display. I’ve managed to get them displaying by copying the single user template to my child theme directory. While this works – its still missing the page containers etc that should be there (i’ve put them in by hand for now).
Also, the page title doesn’t understand the user profile page either. This happens whether Yoast is enabled or not.
I suspect that both these issues revolve around the fact that the user profiles aren’t a post type, & that an alternative template selection method needs to be put in place for user profiles.
Is this something that can be added in?
-
Hello,
Sorry for the late reply.
The Bbpress forum plugin is not included in theme package, so we do not offer support on it. However, i can suggest you add these functions into your function.php file:// Filter wp_nav_menu() to profile link add_filter( 'wp_nav_menu_items', 'my_nav_menu_pro_link' ); function my_nav_menu_pro_link($menu) { if (!is_user_logged_in()) return $menu; else $current_user = wp_get_current_user(); $user=$current_user->user_login ; $profilelink = '<li><a href="'.home_url().'/forums/user/' . $user . '/">Profile</a></li>'; $menu = $menu . $profilelink; return $menu; } // Filter wp_nav_menu() to add profile link add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' ); function my_nav_menu_profile_link($menu) { if (!is_user_logged_in()) return $menu; else $current_user = wp_get_current_user(); $user=$current_user->user_nicename ; $profilelink = '<li><a href="'.home_url().'/forums/user/' . $user . '/edit">Edit Profile</a></li>'; $menu = $menu . $profilelink; return $menu; }
Best regards!
-
Thanks for that.
It doesn’t help the remaining issue that I have – page title for user profile not working…I guess i’ll have to try & find a work around.
BTW – you have stated that you will add support for BBpress previously…
https://support.codeless.co/forums/topic/bbpress-layout/ -
I’ve managed to come up with a workaround for the page title issue – this can be easily adapted by anyone using Yoast SEO.
Put this in your functions.php file
Edit the $title to whatever you want & set /discussion/users/ to your forum user profile path without the username.
function change_yoast_page_titles($title) {
// bbpress user profile
if(strstr($_SERVER[‘REQUEST_URI’],’/discussion/users/’)){
$title = ‘User Profile | ‘ . get_bloginfo(‘name’);
}
return $title;
}add_filter(‘wpseo_title’,’change_yoast_page_titles’,100);
-
Hello,
Thanks for the feedback.
BBpress is not yet included in theme package. We will provide support as soon as it’s included.Best regards!
-
You must be logged in to reply to this topic.