$qry = mysql_query("SELECT test1,test2 FROM ".$table." ORDER BY RAND() LIMIT 6");
$start = new WP_Query('showposts=6&orderby=rand');
if ($start->have_posts()) : while( $start->have_posts() && $rows = mysql_fetch_assoc($qry) ) : $start->the_post();
$test1 = $rows['test1'];
$test2 = $rows['test2'];
I can manipulate the wordpress loop like this.... The problem appears when my table does not have 6 values inside, it happenes sometimes. Then, my index page doesn't show all the posts. For example, if i have 3 entries inside the table, than the loop displays only 3 posts instead of 6.
It would be great if i can make the query repeat itself... to supply the loop.
Any ideeas?