Display MyCred Badge next to buddypress username in DW Question & Answer

I am using Design Wall Question and Answer plugin on a Kleo theme. I want to show MyCred badges for each user next to their name. I know that I need to place the code in the template file: dwqa-content-single-answer.php

and I know that the code is: echo do_shortcode( '[mycred_my_badges]' );

but I am not sure how to get it to work.
Thanks

  • Kasia Swiderska

    Hello Gavin,

    If you have a file then in file you need to find place where to put this shortcode and use it like that

    <?php echo do_shortcode( '[mycred_my_badges]' ); ?>

    if you will place it in html part of the template. If you see that part where you want to paste it is already inside <?php and ?> tags then you will use it

    echo do_shortcode( '[mycred_my_badges]' );

    You have to paste it into template, save file and it will work automatically. If you are not sure where to place it, use code inspector on front end of that page https://developer.chrome.com/devtools to determine what elements (html tags) you should look in template file.

    Let me know if you have more questions.

    kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.