Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to show WP Postratings in bbpress


  • sally
    Participant

    @sallyruchman

    Hello, i have installed the plugin wp-post ratings

    https://wordpress.org/plugins/wp-postratings/installation/

    I want to show the rating in bbpress.

    Find: <?php while (have_posts()) : the_post(); ?>
    Add Anywhere Below It (The Place You Want The Ratings To Show): <?php if(function_exists(‘the_ratings’)) { the_ratings(); } ?>

    In which files, i have to add the php code?

    Thanks a Lot!

    Best Regards
    Sally

Viewing 4 replies - 1 through 4 (of 4 total)

  • sally
    Participant

    @sallyruchman

    Hello,

    i found in the meanwhile a solution..

    Regards
    Sally


    guybrushpixelwood
    Participant

    @guybrushpixelwood

    Hey there, yould you mind to share your solution? I am fighting with the same problem, and it would be very nice from you if you would share your solution:D


    guybrushpixelwood
    Participant

    @guybrushpixelwood

    If somebody stumble upon the same problem here is a solution to get Wp PostRatings Plugin Stars into bbpress topics:

    wp-content/plugins/bbress/templates/default/bbpress/loop-single-reply.php <–

    Search for the line

    <?php bbp_reply_admin_links(); ?>

    and place this under it:

    <span class="bbp-admin-links">
    		<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
     </span>

    😀


    Robin W
    Moderator

    @robin-w

    @guybrushpixelwood – thanks for posting this, that is really useful.

    Howevber it will get overridden by bbpress updates, so either have that file in a bbpress folder in your child theme

    Functions files and child themes – explained !

    or put this function in your child theme’s functions file

    add-action ('bbp_theme_after_reply_admin_links' , 'gbpw_add_ratings' ) ;
    
    function gbpw_add_ratings () {
    	if(function_exists('the_ratings')) { 
    		echo '<span class="bbp-admin-links">' ;
    		the_ratings(); 
    		echo '</span>' ;
    	}
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar