<?php $pageCount = ceil( $count / $limit ); ?>
<?php if( $pageCount > 1 ): ?>
    <div class="pagination">
        <ul class="pagination">
            <?php if( $type == 3 || $type == 2 ): ?>
                <?php if( $page-1 > 0 ): ?>
                    <li><a href="?page=<?php echo $page-1; ?>"><?php echo __( '&laquo; Previous', 'Blog', false ); ?></a></li>
                <?php endif; ?>
            <?php endif; ?>
            <?php if( $type == 3 || $type == 1 ): ?>
                <?php for( $i=1;$i<=$pageCount;$i++ ): ?>
                    <?php if( $i==$page ): ?>
                        <li class="active"><a href=""><?php echo $i; ?></a></li>
                    <?php else: ?>
                        <li><a href="?page=<?php echo $i; ?>"><?php echo $i; ?></a></li>
                    <?php endif; ?>
                <?php endfor; ?>
            <?php endif; ?>
            <?php if( $type == 3 || $type == 2 ): ?>
                <?php if( $page+1 <= $pageCount ): ?>
                    <li><a href="?page=<?php echo $page+1; ?>"><?php echo __( 'Next &raquo;', 'Blog', false ); ?></a></li>
                <?php endif; ?>
            <?php endif; ?>
        </ul>
    </div>
<?php endif; ?>
