Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Hard code link in BP Admin Bar? (3 posts)

Started 1 year, 5 months ago by: katemgilbert

  • Profile picture of katemgilbert katemgilbert said 1 year, 5 months ago:

    I want to take the “Blogs” link from the My Account menu and serve it up as its own item in the BP Admin bar, called something different (My Sites).

    I have already commented out the links I want to hide from the admin bar in bp-core-adminbar.php (My Blogs, Visit), so I know where the code needs to go. But can someone tell me how to to format it? I don’t think adding a with a link is the answer…

    Have also looked at this thread but I’m still lost.

    Thanks!

  • Profile picture of katemgilbert katemgilbert said 1 year, 5 months ago:

    UPDATE: I used the plugin: here to add a link to my admin bar, and it works.

    2nd question – How do I dynamically include the logged in user’s username in the URL that I’m adding?

    For example, I am adding the link to /members/[USERNAME]/blogs/, where USERNAME is the logged in user’s username. I have tried inserting the php calls for wp_get_current_user(); , echo $current_user; and echo $username; , but none work.

  • Profile picture of zeitgeist76 zeitgeist76 said 1 year, 4 months ago:

    hi kate,

    maybe you try this one: use a sidebar widget which allows you to input php .. and then insert the link and try ” echo bp_loggedin_user_domain() ”

    i hope that can help you a little.

    cheers