Bbpress Query Topics For Essays

Allows logged users to vote up or down to topics and replies inside bbPress, just like you can on StackOverflow for example.

  • Ajaxed
  • BuddyPress integration
  • Votes log with users icons
  • Options page
  • Allow to filter a query to sort posts by votes, see FAQ.
  • Hooks and filters to extend the plugin
  • Templates functions to use in your themes (see the file bbpvotes-template.php); eg. bbpvotes_get_author_score() to get an author’s score (karma)


See it in action here.


Contributors are listed


For feature request and bug reports, please use the

If you are a plugin developer, we would like to hear from
you. Any contribution would be
very welcome.


If it hasn’t been done already, you can translate the plugin and send me the translation. I recommand Loco Translate to work on your translations within WordPress.

    Upload the plugin to your blog and Activate it.

    I can’t see the vote links

    Users cannot vote for themselves. If you are the author of a topic or reply, the vote links won’t be available; the score only will be shown.

    Can I filter the query to sort posts by votes ?

    Yes, you can sort the posts by score or votes count, using the query variable ‘bbpvote_sort’.
    Allowed values are ‘score_desc’, ‘score_asc’, ‘count_desc’, ‘count_asc’.

    Example of a query that will fetch the 5 last topics, ordered by score (desc) :

    See function sort_by_votes() for more details.

    How can I customize the look of the vote links ?

    The best way to customize the links is to setup some CSS rules in your theme.
    Check this example on CodePen to see how to have images displayed instead of text.

    If you need more complex customization, you can filter the links using those hooks :

    • bbpvotes_get_vote_up_link
    • bbpvotes_get_vote_down_link
    • bbpvotes_get_vote_score_link

    Works as a charm!


    Exactly what I was looking for. Huge thank you.

    here is a thread on my bbpress forum where a user requested this feature and how it went (with screenshots):

    the problem for me was – “Karma” points were not showing off on the profiles of the users. if that is your case: upvote few comments and change the default “60 minutes” in bbpress votes settings (in your wp-admin) to “5 min” and they will appear after those 5 min. + note that “Karma” will show up only after a person has had at least 1 upvote.

    good thing!

    Great update!


    Does what I was looking for. Vote up/down options, option to hide who votes and has a stacking Karma value that stays with the forum member while he/she posts throughout the forums. Each vote up=1 karma point.


    Excellent Addition to bbPress


    Very interesting plugin that adds a vague concept of voting to your forum.

    The profile images that show up with a vote are very well done.

    Comes with an interesting set of features and options. Worth checking out.

    Read all 11 reviews



    • new BuddyPress profile submenu : forum>karma, where replies are sorted by score


    • Fixed sort topics by votes


    • Fixed bug when displaying topic score
    • Fixed typo in settings
    • Rebuild scores option


    • Migrate options page
    • Option to choose the ‘score’ unit (pts, kudos, …)
    • Option to choose which post types are enabled for voting (topics/replies)
    • Use Dashicons instead of fontAwesome in some places
    • Use a transient to cache author’s karma


    • supports unvoting (by reclicking the link)
    • “sort by votes” link before topics loop
    • Added option to hide voters identity in the vote log
    • Added option to disable downvoting
    • Added options page (under Settings > Forums)
    • Display the score of an topic next to its author when showing a topics list
    • Display the “reputation” score of an author next to its name when displaying a reply


    • SCSS files
    • CSS bug fix (


    • Removed the function ‘author_link_karma’ hooked on the filter ‘bbp_get_reply_author_link’ as it shows up everywhere.
      It’s easier to edit the bbPress templates and to call bbpvotes_get_author_score().


    • New template functions to get votes count by user : bbpvotes_get_votes_down_by_user_count(), bbpvotes_get_votes_up_by_user_count(), bbpvotes_get_votes_total_by_user_count()
    • New template functions to get an author’s score : bbpvotes_get_author_score()
    • Embeds author’s karma (score) under its name, when showing a reply
    • Russian translation by VovaZ


    • Added two meta keys : ‘bbpvotes_vote_score’ (total score) and ‘bbpvotes_vote_count’ (total votes).
    • Filter query to sort items by score or votes count.


    • Fixed crash when BuddyPress is not installed


    • Append votes log with ajax when user has voted
    • French translation
    • Added pot files for translations


    • Replaced ajaxurl with bbpvotesL10n.ajaxurl in bbpvotes.js


    • Fixed $user_vote_link link in bbpvotes_get_post_votes_log()
    • Fixed ‘bbpvotes-post-no-score’ class in bbpvotes_get_score_link()



    I’m running a BuddyPress installation with over +50 000 members. At the time of writing, my versions are BP2.9 & WP4.8 While checking my log files I noticed a slow query log entry that pointed to a BuddyPress query which I’m very concerned about. It generates a subquery with a clause with over +50 000 user IDs. I’m more concerned because my user base is growing and that number could become 75k or 100k. Here is a sample

    1 = 1
    AND u.ID IN (
    spam = 0
    AND deleted = 0
    AND user_status = 0
    AND u.ID IN (
    1, 3, 13, 30,........,50000 <- Problem Area, +50000 IDs passed here
    AND u.ID IN (
    user_login LIKE '%%'
    OR user_login LIKE '%%'
    OR user_nicename LIKE '%%'
    OR user_nicename LIKE '%%'
    u.display_name ASC
    43176, 21

    Ref: Query is generated in this file file:buddypress/bp-core/classes/class-bp-user-query.php method:BP_User_Query::prepare_user_ids_query

    My Questions:

    1. Is that something I should be concerned about?
    2. Is this something I should consider fixing with this hook $sql = apply_filters_ref_array( ‘bp_user_query_uid_clauses’, array( $sql,

    0 Replies to “Bbpress Query Topics For Essays”

    Lascia un Commento

    L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *