• Resolved ashop1

    (@ashop1)


    hi, i want to use your plugin for the following:

    give points for users to get an achievement or give the achievement manually. my users are from woocommerce therefore I have sellers who will get points for selling with the extension of their plugin for woocommerce, and buyers who will get points for buying and both will get an achievement badge.

    Now the drawback I have is that when I want to use a short code like: [gamipress_earnings] and show it somewhere on the simple product page so that buyers can see what the seller or author of the publication has achieved for having achieved several sales , then you should use the user_id attribute.

    but it does not work for me, because it shows me the achievements of all users and not the author of the post or the publication of the product in my case. what I need is for the shortcode to get the product post author id and show only their achievements and badges. I hope I have been clear and I will be very grateful if you give me any suggestions on how to achieve this.

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

    (@rubengc)

    Hi @ashop1

    [gamipress_earnings] is to display a history of everything who have earned the user as explained here:
    https://gamipress.com/docs/shortcodes/gamipress_earnings/

    To display achievements earned you have the following shortcode (check all the attributes since you can configure which types to display, show earned, not earned or all, etc):
    https://gamipress.com/docs/shortcodes/gamipress_achievements/

    But again, on this shortcode you may need to place the user ID of your post author to display it’s achievements.

    Hope this helps!

    Thread Starter ashop1

    (@ashop1)

    Thank you very much for your prompt response.

    I ask you an additional query if I do not bother you, is it possible that the id of the author of the publication is obtained in some way?

    Because as you can see, I cannot write a unique id since the achievement must be shown for each author of the particular publication within the same location that would be in my case the simple woocommerce product page.

    thanks again, have a great day!

    Plugin Author Ruben Garcia

    (@rubengc)

    Hi @ashop1

    The unique way is by checking the post author ID from the user profile

    Here is a tutorial about how to find a user ID:
    https://smartwp.com/wordpress-get-user-id/

    But from our shortcode there is not an automatic parameter to get the author ID yet, sorry

    Hope this helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘show achievements only of the user author of the publication obtaining his id au’ is closed to new replies.