views:

122

answers:

0

I have created a page where there are various items on a page and people need to vote on them by clicking "recommend" (like how they have it on levi.store.com). The items are sorted based on the number of "recommends" they receive. The problem I am having is that there are 100 of these items, and when I try to display them it becomes way too slow. Is there a way to do this more effectively, this is some pseudo-code of what I have (I am using Wordpress)

                $theCategory = 'the-item-category'; //every item is a post and is placed into this category
                $items->query('cat='.$theCategory); //this gets all those items in that category

                while($items->have_posts()) : $items->the_post();  

         <h1><?php the_title(); ?></h1>     

  <iframe src="http://www.facebook.com/plugins/like.php?href=&lt;?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=button_count&amp;show_faces=false&amp;width=450&amp;action=recommend&amp;font&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:140px; height:21px;" allowTransparency="true"></iframe>