How to show WP Postratings in bbpress
-
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
-
Hello,
i found in the meanwhile a solution..
Regards
SallyHey 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
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>😀
@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
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>' ; } }
- You must be logged in to reply to this topic.