Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show points for user

  • Avatar of driz
    driz
    Participant

    @driz

    On my website I want to show the points a user has next to their avatar in posts and comments throughout the site. How could I do this? Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Avatar of driz
    driz
    Participant

    @driz

    Any updates? Just to clarify I’m wanting to show the points of the author of a post within the loop, so where it says there name and shows there avatar I would also like to show the points. Thanks.

    Avatar of driz
    driz
    Participant

    @driz

    e.g. code:

    `

    <?php printf( __( '%s‘, ‘buddypress’ ), bp_core_get_userlink( $post->post_author ) ) ?>

    <a class="user" title="” href=”/members//”>

    • <a title="Points" href="/members//achievements/”>0

    `

    I want to change that 0 to the number of points the user has!

    `displayed_user->id ); ?>`

    Avatar of driz
    driz
    Participant

    @driz

    It wouldn’t be displayed_user as it’s in the loop and NOT on a member page so therefore would be something like author_meta right?

    Avatar of driz
    driz
    Participant

    @driz

    This works `global $bp; dpa_member_achievements_score( get_the_author_meta(‘id’) );`

    Where might i put this code?

    Wherever you want it.

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

The forum ‘Achievements’ is closed to new topics and replies.