Support » Plugin: GamiPress - LearnDash integration » Badge and course association

  • Resolved brucetm


    Hi! Great to connect Learndash and Gamipress, thank you!

    I have a system set up to award a unique badge for each course completed. Works great.

    I am now working to show the earned badge on the completed course in both the course grid and on the course landing page.

    I can see, in the admin field that this add-on adds to gamipress, the relationship between the course and the badge.

    But where is it stored and how do I query it?

    In the course grid or single-course templates I would like to pass the post ID to a function which gives me back the associated badge ID, so I can display it.


Viewing 1 replies (of 1 total)
  • Plugin Author Ruben Garcia


    Hi @brucetm

    The user earnings are stored on the gamipress_user_earnings table

    From this table you can get every user earning and check the post_id field that is associated to the post ID (achievement ID) the user has earned

    Also, there is the gamipress_get_user_achievements( $args ) function that is designed to query on this user earnings table by user id, achievement id and achievement type

    Hope it helps

    Best regards

Viewing 1 replies (of 1 total)
  • The topic ‘Badge and course association’ is closed to new replies.