Skip to:
Content
Pages
Categories
Search
Top
Bottom

User dashboard url


  • MissMad
    Participant

    @missmad

    Hi everyone!

    I’m trying to set up my site and would like to create a link that goes directly to the user’s dashboard (the one you find once you get to the profile page). Does anyone know what the link is? In the browser it’s http://www.mywebsite.com/members/username/dashboard/ but I’d like to automate this for each user…

    Thanks for your help.

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

  • danbp
    Participant

    @danbp

    Hi @missmad,

    this url doesn’t exist, as there is no page called dashboard in WordPress.

    Dashboard is related to wordpress administration. To go there, the path is your-site/wp-admin/index.php

    On a user’s profile, there is a profile settings page.
    your-site/members/username/settings/

    Do you mean this URL ?

    @missmad If you wanted to create a link to go to a specific screen on the logged-in user’s profile, use http://buddypress.dev/members/me/profile/

    Obviously swap in your actual domain. Note the members/me/ bit — that’s the magic part. If that’s found, it redirects to the logged-in user’s profile following whatever comes after it in the URL.


    jbboro3
    Participant

    @jbboro3

    You can’t directly get working url without using little bit of php code (while you’re accessing users profile).. If your content page allows php code, try this: /dashboard”>Dashboard

    else,

    if you are looking for just a profile link of users (any users), then create a page named “profile” and add this code in your functions.php or custom-functions.php :

    function redirect2profile(){
    	include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    	if($_SERVER['REQUEST_URI'] == '/profile/' && is_plugin_active('buddypress/bp-loader.php') && is_user_logged_in()){
    		global $current_user;
    		wp_redirect( get_bloginfo('url') . '/members/'. $current_user->user_login . '/profile/'); 
    		exit();
    	}
     }
    add_action('init', 'redirect2profile');

    Above line will work only if you have set the members directory as “members” in the buddypress settings.. If you named it other, then simply mention that instead of “member” in the /members/ place.

    By doing this you can simply paste url = http://www.mywebsite.com/profile anywhere.. When the users click on the link, it will be directed to their respective profile page..

    But, but: The later tricks will be much slower to access the given link than the former..Choice is yours!

    Good luck.


    jbboro3
    Participant

    @jbboro3

    Sorry the codes are not working: The first code is: //href=”<?php bp_displayed_user_link(); ?/dashboard”>Dashboard

    Avoid // ( I mentioned it because the links are not posting here


    MissMad
    Participant

    @missmad

    Hi all!

    Thanks for your answers. Actually, he /members/me/profile/dashboard works (I do have a dashboard that’s not the WordPress one but rather one I can edit with some of the info from Buddypress).

    Great help!

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