facepush
asked 6 years ago

I have tried a few different options out there but have not found the proper way to set this up. 

Does anyone have any information on creating a bridge between MyCRED and DW: Questions and Answers for both Badges and Points?

5 Answers
DominicStaff
answered 6 years ago

Here is the code to get point from myCred 

<?php if(function_exists('mycred_get_users_cred')) echo '<span class="sep">&sdot;</span><span class="author-bugget">'.mycred_get_users_cred(get_the_author_meta('ID')).' $tone</span>'; ?>

If you want to put this point next to author name. Please copy template files from <your-plugins-folder>/dw-question-answer/inc/templates/ into <your-themes-folder>/<your-themes>/dwqa-templates/ then  put that code into your template files .
Hope this help!

facepush
replied 6 years ago

Could you elaborate in more detail?

I followed your instructions but in my themes folder i do not see a /dwqa-templates/ folder.

Dominic Staff
replied 6 years ago

You need to create a new folder with named “dwqa-templates” in your theme folder then copy the template file that you want to add the Mycred code in the /dw-question-answer/templates/ Then open the files to add the code.

facepush
answered 6 years ago

https://imgur.com/6KKz1Y9

Here is the code in the templates.php folder as per instructions. Still doesnt look like it is working

Dominic Staff
replied 6 years ago

Please send me username & password of your site or FTP account for further checking, I will help you resolve it.

DominicStaff
answered 6 years ago

I have helped you resolve this issue, you can check your site now.
See the screenshot: http://prntscr.com/ioejsz

facepush
answered 6 years ago

Thank you @dominic
 

facepush
answered 6 years ago

@dominic, upon looking into your fix it appears there is some other issues with the posts itself 
https://imgur.com/nPoEXzk

There is also no hook showing in the log for Mycred

 

Dominic Staff
replied 6 years ago

What do you mean?
I have helped you add the code to the content-single-question.php, content-single-answer.php and content-comment.php, you can check your fine now.

Powered by DW Question & Answer Pro