Yes, this is utilizing the standard class from bbPress (unless they recently changed it). Do you happen to use a theme that has a bbpress overrides folder in it? Or, are you using a plugin that substantially changes the structure of bbPress views?
Yes, I’m using a custom bbpress theme and the css structure isn’t the same.
Ok, yeah, I’m using standard bbPress hooks for showing my voting buttons. But, if you know how to find a hook in the place where you want your voting buttons to be, then you can add this to your functions.php file…
add_action('some_custom_hook_name', 'bbp_voting_buttons');
Hi!
Sorry about the delay.
I’m not sure this is going to solve the problem, because the JS code expects the following css structure to update total votes:
jQuery(‘.post-‘ + post_id + ‘.topic-author .bbp-voting, .post-‘ + post_id + ‘.type-reply .bbp-voting’)
As my classes are not the expected ones, number of votes won’t update even if put the voting buttons somewhere else.
As a suggestion, the score div holder should have an id like “bbpress-score-(post_id). This way, you can directly update the score without depending on theme classes.
That’s a great point. I’m not sure why I had so much specificity on that jQuery selector. I removed all the extra specificity since I only need to target each ‘.bbp-voting’ element. Update the plugin and let me know if that works for you.
Well, we have a bug not. haha
This way, all scores on page are changing when voting. I suggest you the following:
jQuery(“.bbp-voting-post-“+post_id+” .score”)
Oops, sorry about that. Fixed. Please update and test again.