Skip to:
Content
Pages
Categories
Search
Top
Bottom

bp_get_member_user_id() in header


  • junger
    Participant

    @junger

    Hi all – for some reason, I’m completely unable to use bp_get_member_user_id() in the header.php file of my bp-default theme.

    I need to pull logged in user ids to show them navigation based upon their xprofile fields, but bp_get_member_user_id() won’t generate anything in the header.

    If I put it in the footer, it works, and I can store it as a variable, but since the header navigation loads first, it doesn’t show the right content.

    How can I successfully generate a logged in member’s user id in the header?

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

  • junger
    Participant

    @junger

    PS – here’s the code I’m trying to use.


    junger
    Participant

    @junger

    Anyone? I know it can’t be this hard to pull the member user id in the header …


    junger
    Participant

    @junger

    Bueller … anyone?

    How can I pull a user ID in the header?


    Boone Gorges
    Keymaster

    @boonebgorges

    `bp_get_member_user_id()` only works inside of a member loop. To get the id of the logged in user, try `bp_loggedin_user_id()`, id

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘bp_get_member_user_id() in header’ is closed to new replies.
Skip to toolbar