Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

BBpress User Profile Pages

bbpress tower
    • 9 years, 7 months ago craftygeek
      Participant

      Expired

      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?

    • 9 years, 6 months ago Mirela
      Participant

      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;
        
      }

      Source.

      Best regards!

    • 9 years, 6 months ago craftygeek
      Participant

      Expired

      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/

    • 9 years, 6 months ago craftygeek
      Participant

      Expired

      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);

    • 9 years, 6 months ago Mirela
      Participant

      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!

Viewing 4 reply threads

You must be logged in to reply to this topic.

Login

Log In
Register

Renew Support

  • Renew Specular Support
  • Renew Tower Support
  • Renew Folie Support
  • Renew Handel Support
  • Renew June Support
  • Renew Picante Support
  • Renew Thype Support
  • Renew Regn Support

Search Forums

Forums

  • Bygge – Construction Theme
  • Converta – Software Theme
  • Folie – The WordPress Website Builder
  • Handel – Responsive Multi-Purpose Business Theme
  • June WooCommerce WordPress Theme
  • Livecast – Podcast Theme
  • Picante – Restaurant & Food WordPress Theme
  • Regn | Agency & Business WordPress Theme
  • Remake – Minimal Portfolio & Agency Theme
  • Specular – Multi-Purpose WordPress Theme
  • Suggest us Features
  • Tower – Business-Driven Multipurpose WP Theme
  • Vibrance – Photography Theme

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password