Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • wolfpup64
    Participant

    @wolfpup64

    Ah! It lives. I must’ve been looking at the wrong codex page, either way I would’ve been struggling with the whole redirect thing for a while haha. Thanks so much for your help man, I’ve been trying to figure this stuff out for a couple weeks now. These support forums really need a buy a beer button.


    wolfpup64
    Participant

    @wolfpup64

    yo my god my dude, you are the best. merci! I certainly owe you beers.


    wolfpup64
    Participant

    @wolfpup64

    oh wait no, thats what it was giving me in the first place…

    arrhhggh. I’ve got it down like this.

    function add_communityprofile_tab() {
    	global $bp;
    	
    	bp_core_new_nav_item( array(
    		'name'                  => 'Community',
    		'slug'                  => 'communityprofile',
    		'parent_url'            => $bp->displayed_user->domain,
    		'parent_slug'           => $bp->profile->slug,
    		'screen_function'       => 'communityprofile_screen',			
    		'position'              => 200,
    		'default_subnav_slug'   => 'communityprofile'
    	) );
    }
    function communityprofile_tab() {
       bp_core_redirect( site_url( '/community/profile/'.bp_get_loggedin_user_link()() ) );
    }
    add_action( 'bp_setup_nav', 'add_communityprofile_tab', 100 );

    wolfpup64
    Participant

    @wolfpup64

    That seems to work for pulling the appropriate user, I input it into the line shane provided

    function communityprofile_screen() {
       bp_core_redirect( site_url( '/community/profile/'.bp_get_loggedin_user_link()() ) );
    }

    but it looks like it gets overwritten by the slug in the aforementioned code that makes the tab appear and leads me to the url:

    http://localhost/wordpress/users/*username*/communityprofile/

    once again, if I try to remove the slug from the line the tab itself disappears. oh man this has been frustrating.


    wolfpup64
    Participant

    @wolfpup64

    Theres a button to the site profile from the wpforo profile, but not vice versa.

    Thanks for the help though, I’ll check in with wpForo support and see if they can’t help me out.


    wolfpup64
    Participant

    @wolfpup64

    bump for some love?


    wolfpup64
    Participant

    @wolfpup64

    Thanks for getting back to me shane, unfortunately that redirects to the wpForo page:

    http://localhost/wordpress/community/

Viewing 7 replies - 1 through 7 (of 7 total)
Skip to toolbar