• Resolved emiliengerbois

    (@emiliengerbois)


    Hi Michael,
    I hope you are fine,

    Here is a new question I need to ask you:
    – I use a plugin to display my achievements as a grid
    – I also use another plugin to display a map of my achievements

    Currently there is no difference between a earned badge and a not earned badge in those outputs.

    > would it be possible to use CSS to make a difference in order to show my users if a badge they see in the output has been earned already or not for them, just like in the achievement-list shortcode … ?

    I guess I’d need to add the user-has-earned css class to the output’s elements … what do you think about this?

    Thank you so much in advance and have a nice day,

    Emilien

    https://www.ads-software.com/plugins/badgeos/

Viewing 1 replies (of 1 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    you could use the badgeos_has_user_earned_achievement() function. It has the parameters, in order, of $achievement_id and $user_id.

    It’ll return true or false, which you could use to conditionally set a class or conditionally output something.

Viewing 1 replies (of 1 total)
  • The topic ‘use .user-has-earned css class in a third party plugin output of badges’ is closed to new replies.