Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to connect the WP user profile and the bbPress user profile


  • janecarole
    Participant

    @janecarole

    I have a WP-Members profile that shows up when a logged-in user chooses “My Profile” from the drop down list on the Home tab on my website:

    https://lemonstograpes.com/home

    (WordPress 6.0)

    I would like the user’s WP profile information to have a link that would take the user to their bbPress Forum profile. I have no idea how to do this (not a programmer).

    My current solution is to include the following text at the bottom of the user’s WP-Members profile:

    (Note: User Profile information that provides forum related detail is accessed by clicking the picture [avatar] that appears beside a Forum post.)

Viewing 5 replies - 1 through 5 (of 5 total)

  • Robin W
    Moderator

    @robin-w

    is this the free plugin here

    WP-Members Membership Plugin


    janecarole
    Participant

    @janecarole

    Yes.


    Robin W
    Moderator

    @robin-w

    ok,

    1. create a page called ‘profile’, it needs no content, but make sure the permalink is ‘profile’
    2. in dashboard>settings>wp members>pages>profile select the profile page

    then use this code

    add_action( 'template_redirect' ,'rew_profile' ) ;
    
    function rew_profile () {
    	update_option ('rewurl' , $_SERVER['REQUEST_URI']  ) ;
    	if ($_SERVER['REQUEST_URI']   ==  '/profile/') {
    	$user_id =get_current_user_id() ;
    	$url = bbp_get_user_profile_url( $user_id ) ;
    	exit( wp_redirect( $url ) );
    		}
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets


    janecarole
    Participant

    @janecarole

    Thank you, Robin, that worked. So grateful for you! Please provide me the link you gave me before (on a different topic) so I can thank you meaningfully ($) for your research/coding for me!

    I ended up creating a link on my “Member Profile” page to the new “profile” page you had me create. (I did this so the user would still see WP-Members “Member Profile” page with its unique information.) I used Code Snippets to add your code.

    Not that you need to know this, but: Right after making this change, I had to restore my site because a plugin update (WP-Crontrol) broke the site, and it wouldn’t load. The restore fixed that problem, but caused a problem with my Wordfence connection which messed up my site log-in. It took a while to figure that one out, but after disconnecting and reconnecting Wordfence, I am back to normal (except for needing to make your change again 🙁 …). Plan to do that later.


    Robin W
    Moderator

    @robin-w

    great – glad it worked

    Home

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar