Mycred Badges and Points with anspress

6.78K viewsUpdates
1

Hello, I would want to know how to make an integration mycred and anspress.
Example: an answer messenger = badges of mycred and 10pts …

1

Following@Rahul suggestion, i’ve created an example of mycred hook:

add_action(‘ap_publish_comment’, function($comment) {<br />
$points=5;<br />
mycred_add(‘ap_comment’,$comment->user_id,$points,”Points for comment sent”);<br />
}, 10, 1);

it can be done for all other hooks.

commented on answer

Hello, thank you for your answer! I have a question the code, I put him where?
You have an idea for badge

the easiest way is putting it in function.php of your theme (but it will be removed by theme updates if 3rd party). if you want a clean way i suggest you to inform about wordpress child themes (search on google)

about badges i dunno, but mycred codex is awesome: http://codex.mycred.me/ , Chapter VI contains all functions you need that you can call in reputations hooks that Rahul linked.

ofc it requires some skills with wordpress programming 🙂

I have problem : Parse error: syntax error, unexpected ‘<' in /home/web12638/web/wp-content/themes/boss/functions.php on line 19

You are viewing 1 out of 3 answers, click here to view all answers.