페이지에 다양한 항목이있는 페이지를 만들었으며 사람들은 "추천"(예 : levi.store.com에있는 방법)을 클릭하여 투표해야합니다. . 항목은받은 "추천"수에 따라 정렬됩니다. 내가 가지고있는 문제는이 항목이 100 개이며, 표시하려고 할 때 너무 느리다는 것입니다. 더 효과적으로 할 수있는 방법이 있나요이 내가 가진 것의 일부 의사 코드 (나는 워드 프레스를 사용하고 있습니다)한 페이지의 여러 페이 스북 (Facebook)과 같은 도움말
$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=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=button_count&show_faces=false&width=450&action=recommend&font&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:140px; height:21px;" allowTransparency="true"></iframe>
SQL을 표시 할 수 있습니까? – Babiker
난 그냥 게시물에 대한 WordPress의 쿼리 기능 내장 -> http://codex.wordpress.org/The_Loop를 사용하고 있습니다 – fewpeople