Search code examples
phpwordpresspodscms

Pods fetchRecord skips items


So I have am grabbing some records using Pods.
I have 31 records, but my while($thePod->fetchRecord()) loop only goes 15 times

$thePod = new Pod('projects');
$thePod->findRecords('slider_order ASC');
$totalItems = $thePod->getTotalRows(); // = 31

while($thePod->fetchRecord()) :
  $i++;

endwhile;

echo $i.'/'.$totalItems.' looped through'; // displays 15/31

Any ideas why this is occuring?


Solution

  • Change line 2 to:

    $thePod->findRecords('slider_order ASC',-1);
    

    15 is the default records per page, -1 returns all records.