Skip to:
Content
Pages
Categories
Search
Top
Bottom

I want to create a profile button in my main navigation


  • concrain
    Participant

    @russelrocketpopmediacom

    Hi guys, im trying to figure out the code to create a profile button for the main navigation. i need the button to understand how to go to the logged in users.. public/profile/page.

    just like the myAccount/profile/public from the drop down menu in wp

    <?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>

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

  • Brajesh Singh
    Participant

    @sbrajesh

    Edit:I tried twice to post the complete code,but no success.

    well here is what you need

    use bp_get_loggedin_user_link().It will point to user profile.Use it with a combination of is_user_logged_in() mto make it more useful


    concrain
    Participant

    @russelrocketpopmediacom

    thanks man it worked like a charm : )


    dwpers
    Participant

    @dwpers

    I’m interested in this fix as well, but don’t quite understand how to put together bp_get_loggedin_user_link() and is_user_logged_in() to make a link to the members profile page.

    I’m using the sidebar login widget and when you click profile on the sidebar once logged in, it goes to the WP profile page on the backend, not the buddypress profile.

    Is there a way to use your above method to patch this somehow? I figured this was how it was supposed to be but I did something wrong? Thanks :)


    Brajesh Singh
    Participant

    @sbrajesh


    dwpers
    Participant

    @dwpers

    Yes, I’m using Mike Jolley’s Sidebar Login.


    Brajesh Singh
    Participant

    @sbrajesh

    ahh ok, in that case , you will need to modify the function widget_wp_sidebarlogin()

    specifically, for the current version from line number 153 to 177.

    btw ,if you can wait , I will edit the plugin ,make it bp-compatible and upload it somewhere , but not now , tomorrow ,as It is too late here :)

    for everyone else looking at the plugin

    we need to modify following things there

    1.gravatar-should use bp avatar mechanism

    2.login link

    3.logout link.


    dwpers
    Participant

    @dwpers

    Sure, I can wait :). Thanks Brajesh, you’re a life saver :)


    Brajesh Singh
    Participant

    @sbrajesh

    hi

    well here is the modified plugin. It will show the avatar from buddypress and the link will be the name of the user with the profile link.

    http://buddydev.com/http//buddydev.com/public-download/sidebar-login.zip

    I will advise to do one thing though.

    after installing plugin go to Tools->Sidebar Login

    and from the Logged in links text box, remove the line which says wp-admin/profile.php

    This should work perfect then.

    If you get any problem,please let me know. I will be glad to assist further :)


    dwpers
    Participant

    @dwpers

    Brajesh,

    Thanks so much for the great work. It works wonderfully so far.

    However, I am having a display problem, please see this screenshot.

    The bullet points overlap the image and for some reason I have 3 bullets when there should only be 2. I did as you said and removed everything from the Logged in Links section. Is there a way to customize this a bit more? I’d like to go in and add shortcuts to a users mail, groups etc.

    Thanks Again!


    Tom
    Participant

    @jeffreeeeey

    I’ve not tested the new version of sidebar login posted earlier in this thread, but I am using the original version for WP. To overcome those bulletpoints overlapping, I simply removed the avatar altogether.

    A question, related to sidebar login- The name of this widget shows in a grey colour (Login), but all other widgets have the title in white. I’ve searched the CSS files and studied the sidebar login php file also, looking for a solution but can’t for the life of me find how to change the title to white. Can anyone point me in the right direction?


    micb11
    Participant

    @micb11

    I have downloaded the revised plugin . When I try to go to the admin section I get You do not have sufficient permissions to access this page. It works fine with the original plugin . Any Ideas?


    thelandman
    Participant

    @thelandman

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘I want to create a profile button in my main navigation’ is closed to new replies.
Skip to toolbar