Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do a post a variable in a link?

  • @moddedlife

    Participant

    Okay, so im working on redirecting the generic buddypress buttons, but i need a way to get the username of the current person logged in. I was thinking like a variable in a url or something? But i cant seem to get it to work. Anyone know what i can do? I need it to be something like this: http://moddedlife.com/(USERNAME)/settings.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • @stwc

    Participant

    For stuff like this, the fastest and easiest thing to do is just look at the template files you’ll be modifying for your child theme, the stuff in bp-themes/bp-default to see how it’s done. Have a look at /bp-themes/bp-default/members/index.php for example.

    You probably want bp_get_loggedin_user_fullname(). See here, too: https://codex.buddypress.org/developer-discussions/buddypress-template-tags/

    @moddedlife

    Participant

    Thanks man

    @boonebgorges

    Keymaster

    bp_loggedin_user_domain() .’settings’ is probably what you want in this case. The general point about looking at the template files for this kind of thing is exactly right. You can also browse through the core templatetags files (bp-groups/bp-groups-templatetags.php, etc) to see what kinds of output functions are available.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do a post a variable in a link?’ is closed to new replies.
Skip to toolbar