- Mar 22, 2013
- 9,153
- 10,492
Check out this page: http://goo.gl/mnG09W
Scroll down to the bottom of the page and look at the "Latest Feedback" section. See how it eventually gets long? And hopefully in time it will get even longer.
What I want is to display, say, 10 feedbacks, and then for the rest of them to have a "Load More" button or something like that.
Here is the code from that php file that is related to that bit:
So I need that functionality implemented there. I'm assuming it should not be hard to do, but, I'm not sure.
Hope someone can help. Thanks.
Scroll down to the bottom of the page and look at the "Latest Feedback" section. See how it eventually gets long? And hopefully in time it will get even longer.
What I want is to display, say, 10 feedbacks, and then for the rest of them to have a "Load More" button or something like that.
Here is the code from that php file that is related to that bit:
Code:
<div class="box_title_feedbk"><?php echo __("Latest Feedback",'PricerrTheme'); ?></div>
<div class="box_content_feedcontz">
<?php
global $current_user;
get_currentuserinfo();
$the_id = get_the_ID();
$pid = get_the_ID();
$post = get_post(get_the_ID());
$uid = $post->post_author;
$author = get_userdata($uid);
global $wpdb;
$query = "select distinct *, ratings.id ratid from ".$wpdb->prefix."job_ratings ratings, ".$wpdb->prefix."job_orders orders,
".$wpdb->prefix."posts posts where posts.ID=orders.pid AND posts.ID='$pid' AND
ratings.awarded='1' AND orders.id=ratings.orderid AND posts.post_author='$uid' order by ratid desc limit 12";
$r = $wpdb->get_results($query);
if(count($r) > 0)
{
foreach($r as $row)
{
$post = $row->pid;
$post = get_post($post);
$user = get_userdata($row->uid);
?>
<div class="post" style="border:0" id="post-<?php echo $row->ratid; ?>">
<div class="padd10_only">
<div class="image_holder4">
<img width="25" height="25" border="0" src="<?php echo pricerrTheme_get_avatar($row->uid,25,25); ?>" />
</div>
<div class="title_holder4" >
<h2><a href="<?php echo get_bloginfo('siteurl'); ?>/user-profile/<?php echo $user->user_login; ?>"><?php echo $user->user_login; ?></a>
<span class="rating-beeing-done"><?php
$xx = current_time('timestamp',0) - $row->datemade;
$xx = PricerrTheme_prepare_seconds_to_words($xx);
echo sprintf(__("wrote %s ago",'PricerrTheme'), $xx);
?></span></h2>
<div class="c111"><p><?php
if($row->grade == 1) echo '<img style="float:left" src="'.get_bloginfo('template_url').'/images/thup.png" border="0" /> Â ';
if($row->grade == 0) echo '<img style="float:left" src="'.get_bloginfo('template_url').'/images/thdown.jpg" border="0" /> Â ';
?>
<?php echo stripslashes($row->reason); ?></p>
</div>
</div>
</div>
</div>
<?php
}
}
else
{
_e("The service doesn't have feedback yet.","PricerrTheme");
}
?>
</div>
So I need that functionality implemented there. I'm assuming it should not be hard to do, but, I'm not sure.
Hope someone can help. Thanks.