Skip to:
Content
Pages
Categories
Search
Top
Bottom

User ID empty on front page, template tags return null

  • Avatar of Pascal Birchler
    Pascal Birchler
    Participant

    @swissspidy

    I’m currently running a single WP 3.0.1 and BP 1.2.5.2 with my own bp compatbile theme.

    In my theme’s header.php I have something like this:

    `

    <a href="”><a href="”>

    `

    This works fine on all pages except the front page (doesn’t display anything). In Settings->Reading I’ve got a custom front page and I also use front-page.php in my theme. `$bp->loggedin_user->id` returns the correct id, but it seems like in ithe template tags it doesn’t.

    May anybody help me?

    Thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • bp_displayed_user_avatar only works when used somewhere in a BuddyPress member loop, e.g. on a particular member’s profile pages, or in the member directory.

    Do you perhaps want the logged-in user’s avatar? Use bp_loggedin_user_avatar instead (no need to call get_currentuserinfo() for it).

    Avatar of Pascal Birchler
    Pascal Birchler
    Participant

    @swissspidy

    Thank you for your fast reply!

    `bp_loggedin_user_avatar()` did the trick and works perfectly. I also found the other correct functions in the docs.

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

The topic ‘User ID empty on front page, template tags return null’ is closed to new replies.