WordPress Plugins > WP-PostRatings
¿How to display highest or most rated list wit thumbnail? Here the answer!
fmsllc:
THANK YOU JUAN. I was looking for a solution to this problem for quite some time and ..... I can't believe how easy it was with simple addition of some code and a plugin. I literally spent over a week looking for a solution without adding custom fields.
Also a huge thanks to the Mr. Chan for making some great plugins!!!!!!
juanpons14:
I also can't believe how easy it was...only it was thinking and look the Wordpress Docs.
Bye and I'm glad for helping people!!
If you need any support only ask here.. =) :D
fmsllc:
--- Quote from: juanpons14 on 29 July 2009, 01:36 ---I also can't believe how easy it was...only it was thinking and look the Wordpress Docs.
Bye and I'm glad for helping people!!
If you need any support only ask here.. =) :D
--- End quote ---
question, I'm trying to display only the post rated more than X amount of times. What do I need to add to the code to make that happen?
An example is what Chan already included, the ability to:
"The value 0 refers to the minimum votes required before the post get shown."
Now using the query post function, can I still achieve that?
GaMerZ:
I don't think you can archive that using the query_post function.
K4iz3n:
If I want to post it on a page, do I post everything? Sorry I am new and its kinda confusing for me.
Firstly I edit my single.php to look like this:
--- Code: ---<?php $aOptions = MyTheme::initOptions(false); ?>
<?php
if ( have_posts() ) { the_post(); rewind_posts(); }
<?php query_posts('r_sortby=highest_rated&r_orderby=DESC&showposts=50&cat=1') ?>
<?php while (have_posts()) : the_post(); ?>
if ( in_category($aOptions['sideblog-cat']) ) {
include(TEMPLATEPATH . '/single-blog.php');
} else {
include(TEMPLATEPATH . '/single-video.php');
}
<?php endwhile; ?>
?>
--- End code ---
An then on my page, I posted this:
--- Code: ---<div class="top_top2" style="padding-left:10px;">
<table style="width:500; height:32; vertical-align:middle; position:absolute;" align="left">
<td style="width:32; height:32; float:left; vertical-align:middle; margin-right:2px;"><div class="thumbnail"><?php images('1', '29', '32', 'aligncenter', true); ?></div></td>
<td style="width:468; height:32; float:left; vertical-align:middle; margin-left:5px;">
<b><font style="margin-top:35px; margin-left:0px;" color="white" size="2" align="left"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></font></b>
</td></table>
<table style="width:450; height:30; vertical-align:middle; margin-top:38px; margin-left:63px; position:absolute;" align="right">
<td style="width:80; height:30; vertical-align:middle; text-align:right; padding-right:217px;"><span style="color:white;"><b>Votado:</b> <?php $key="ratings_users"; echo get_post_meta($post->ID, $key, true); ?> veces</span></td>
<td style="width:335; height:30; vertical-align:middle;"> </td>
<td style="width:35; height:30; vertical-align:middle; padding-left:5px; text-align:center;"><b><font style="color:white; size:14; font-family:sans-serif; font-weight:600;" ><?php $key="ratings_average"; echo get_post_meta($post->ID, $key, true); ?></b></font></td></table>
</div>
--- End code ---
Obviously this didnt work. Can someone tell me what I did wrong?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version