Skip to:
Content
Pages
Categories
Search
Top
Bottom

Linking directly to Member features

  • Avatar of dxbserver
    DXBServer
    Member

    @dxbserver

    I cannot for the life of me work out how to make a hyperlink to specific features (for example: ‘Edit Profile’, or ‘Read Messages’ or ‘My Groups’) because the URL for each of these requires the logged-in users username as follows:

    example.com/members/username/profile/edit
    or
    example.com/members/username/messages/inbox

    How do I write a hyperlink that will always include the relevant logged-in users username in the centre of this url?

Viewing 1 replies (of 1 total)
  • Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    If you’re looking for a bit of PHP to generate such a link in your BP templates, try this:

    <a href="<?php bp_loggedin_user_domain() ?>/messages/inbox">Inbox</a>

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.