How to implement 'load more' on this page?

Discussion in 'Web Design' started by Scorpion Ghost, Nov 7, 2015.

  1. Scorpion Ghost

    Scorpion Ghost Supreme Member

    Mar 22, 2013
    Likes Received:
    On the Interwebz
    Check out this page:

    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:

                   <div class="box_title_feedbk"><?php echo __("Latest Feedback",'PricerrTheme'); ?></div>
                <div class="box_content_feedcontz">
                    global $current_user;
                    $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 *, ratid from ".$wpdb->prefix."job_ratings ratings, ".$wpdb->prefix."job_orders orders, 
                    ".$wpdb->prefix."posts posts where AND posts.ID='$pid' AND 
                     ratings.awarded='1' AND 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 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); 
                            <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>
                        _e("The service doesn't have feedback yet.","PricerrTheme");    

    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.