Adding Pagination to to custom form block results
/**
 * Implements hook_block_info().
 */
function custommodule_block_info() {
    $blocks = array();
    $blocks['latest_news'] = array(
        'info' =&gt; t('Latest News'),
        'cache' =&gt; DRUPAL_NO_CACHE,
    );

    return $blocks;
}

    /**
 * Implements hook_block_view().
 */
function custommodule_block_view($delta = '') {
    $block = array();
    switch ($delta) {

        case 'latest_news':
            $block['subject'] = t('');
            $block['content'] = latest_news();
            break;
    }
    return $block;
}


/*
 * Implementation of hook_theme
 * */

function custommodule_theme() {
    return array(

        'latest_news' =&gt; array('variables' =&gt; array('data' =&gt; array()),
        'template' =&gt; 'latest_news'),

    );
}

    function latest_news() {
     $query = db_select('node', 'node');
    $query = $query-&gt;fields('node', array('nid'))
            -&gt;condition('node.status', 1) //Published.
            -&gt;condition('node.type', 'auction_news');
    $query = $query-&gt;extend('PagerDefault');
    $result = $query-&gt;limit(20)-&gt;orderBy('node.created', 'DESC')-&gt;execute()-&gt;fetchAll(PDO::FETCH_ASSOC);
    $paging = theme('pager');

    return theme('latest_news',array('data' =&gt; $result,'paging'=&gt;$paging));
}


In a tpl file latest_news.tpl.php

 &lt;ul&gt;

    &lt;?php 
    foreach($data as $lat_news)
    {


       echo '&lt;li&gt;'.$lat_news-&gt;nid.'&lt;/li&gt;';
    }
    ?&gt;
    &lt;/ul&gt;
    &lt;div&gt;&lt;?php echo $paging;?&gt;&lt;/div&gt;