Skip to:
Content
Pages
Categories
Search
Top
Bottom

User Porfile Page

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

  • brunof13712
    Participant

    @brunof13712

    ????????


    Robkk
    Moderator

    @robkk

    you can use this to add links to the edit profile section of your profile in the menu.

    Layout and functionality – Examples you can use

    you can then use this to just lead to just the profile

    // 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="/forums/users/' . $user . '/">Profile</a></li>';
            $menu = $menu . $profilelink;
            return $menu;
     
    }

    then you can just create a link to your topics archive by going to the menu section and adding a link to the menu with the link being yoursite.com/topics


    brunof13712
    Participant

    @brunof13712

    Hi @Robbk,

    I added this code on functions.php from my theme and appeared a link ”profile” on my menu who directs to this link: http://quadriciclobrasil.com.br/forums/users/admin/ but it is a page not found. Am I doing it correctly?


    Robkk
    Moderator

    @robkk

    in both functions you see something similar to this

    $profilelink = '<li><a href="/forums/users/' . $user . '/">Profile</a></li>';

    change forums to forum , since you have changed your root slug.

    $profilelink = '<li><a href="/forum/users/' . $user . '/">Profile</a></li>';


    brunof13712
    Participant

    @brunof13712

    I did the changes but I am still having problems…
    http://quadriciclobrasil.com.br/forum/users/admin/edit

    Do I need to create a page or a post?

    sorry to ask to much…


    Robkk
    Moderator

    @robkk

    Do I need to create a page or a post?

    no

    is the edit profile link working?? is the profile link working?? both or no

    link me to your profile, because it seems to be working fine based on the url

    maybe edit each of the two functions , there might be a word in English that you need to change to be in your language.


    brunof13712
    Participant

    @brunof13712

    Robkk,

    I hope to be understanding what you are requesting from me… sorry my english…

    This is my link profile (when I click on my name in any topic): http://quadriciclobrasil.com.br/forum/users/admin-2-2-2/

    This is the link when I click on ”edit profile” that is appearing on my menu after have I added the code on functions.php: http://quadriciclobrasil.com.br/forum/users/admin/edit (PAGE NOT FOUND)

    anyway, can I give you a admin acess?


    Robkk
    Moderator

    @robkk

    @brunof13712 did you import your users from some other forum software/cms software ??

    because how the functions work is that it uses the current users username that they use to login ,

    so if you login using

    username:admin
    password:(the password you chosen)

    the functions should work fine.

    but since your forum profile username is admin-2-2 it goes to a 404 not found error


    brunof13712
    Participant

    @brunof13712

    Thank you so much Robkk!

    I used a plugin called profile builder pro. With this plugin, the users were using their e-mail to login. Then, I removed this plugin. But all users that had made their login with their e-mail at these time had your profile url changed to something like (username)2-2-2.

    Has some way so that I can adjust all the users who are with your links 2-2-2?


    Robkk
    Moderator

    @robkk

    ask the plugin author about changing users username they used to login.

    other than that i guess just allow your users to change their username they used to login for a short time.


    brunof13712
    Participant

    @brunof13712

    Robkk, thank you so much!

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