Skip to:
Content
Pages
Categories
Search
Top
Bottom

Using Buddypress template functions in non-Buddypress template files?

  • @matm00

    Member

    I’m trying to display some user data on a non-Buddypress template file, but I can’t get it working.

    How can I use BP functions such as bp_displayed_user_username() on non-BP pages, or do I need to find the standard WP equivalents?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • @djpaul

    Keymaster

    Most should work fine. The displayed_username functions, however, are only set when you are visiting a page that displays a user — this is usually a member profile. If you use it on a blog post, for example, you’ll get no value from it.

    @matm00

    Member

    Thanks for the reply Paul.

    Do you know how can I go about telling a non-BP template page that I want it to display a BP user’s data?

    Basically, I’ve copied the code from ‘members/single/home.php’ into a non-BP template file, but none of the user data is appearing. Having compared ‘home.php’ with my non-BP template file there’s no difference in the code, so there’s obviously something happening elsewhere to specify which pages are BP pages.

    Sorry if I’m not making much sense, it’s hard to explain…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using Buddypress template functions in non-Buddypress template files?’ is closed to new replies.
Skip to toolbar