Info
- 6 posts
- 4 voices
- Started 5 years ago by actorjiml
- Latest reply from wmarcy
- This topic is resolved
Looking for help with bb-ratings
-
- Posted 5 years ago #
I am looking for some help with the plugin bb-ratings. Specifically the functions bb_top_topics. From what I gather it returns an array of topics in descending order of the votes the topics have received. I took that information and put the following in my front page template:
<?php bb_top_topics();
foreach ($topics as $topic) : ?>
<tr<?php alt_class('forum'); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a>
</td>
<td class="num"><div class="rating-holder"><?php bb_rating();?>
<span class="count"><?php bb_rating_count(); ?>The problem is that it does not display the topics in descending order, it just displays all of the most recent in the order they were entered.
I know the plugin page (bbpress.org/plugins/) has this function working as it should be.
Thanks in advance for any help.
-
- Posted 5 years ago #
Try
$topics = bb_top_topics();as your first line.
-
- Posted 5 years ago #
D'oh! Works like a charm.
Just goes to show that you can look at something too hard.
Thanks so much.
-
- Posted 5 years ago #
Same thing happened to me in one of mine. I was using get_header instead of bb_get_header. Silly mistakes are the worst when you need help finding them ;)
-
- Posted 5 years ago #
Glad it works :)
-
- Posted 5 years ago #
Any chance we can get a chunk of functioning code to implement bb_top_topics()
(the code in the first message and subsequent messages are not working for me...)
I have been playing with it for better pat of a day and no go.
Thanks!
-
You must log in to post.