Rating categories ?
-
Hi Lester,
I’m using your great plug-in for long on some sites to rate posts.
Now I’m working on a new project about video games.Each “Video Games” is a category and there will be many posts for each “Video Games” as categories.
Of course I know how to handle your plug-in for the posts but trying to use it for categories, I’m currently unable to know if what I would like to do could be done.The rating works for categories, so on a category page, visitors could rate the “video game” and I’m able to display a rate on each “video games” page.
But is it possible to display each categories rate on the same page? I’m currently unable to do it.
Using
<?php $categories = get_categories(); foreach ($categories as $category) { echo '<a href="'. get_category_link( $category->term_id ) .'"><img src="'. z_taxonomy_image_url($category->term_id, 'medium') .'" /><br/>'. $category->cat_name .'</a>'; } ?>I’m able to display all “video games”/”categories” on the same page.
But if I add in the foreach loop
if(function_exists('the_ratings')) { the_ratings(); }it doesn’t display the ratings of each “video games”/”categories” but it displays the rating of the page I’m building under each “video games”/”categories”.
I assume I’m missing something but my programming skills are not good enough to find it on myself.
Thanks for your help.
Fred
The topic ‘Rating categories ?’ is closed to new replies.