// Define the LIMIT and add the OFFSET if it exists if ( isset( $limit ) ) { $limit = " LIMIT $limit"; if ( isset( $offset ) ) { $limit .= " OFFSET $offset"; } } // Otherwise use the default limit, unless specific posts are requested elseif ( !isset( $paramset['id'] ) && !isset( $paramset['slug'] ) ) { $limit = (int) Options::get('pagination') ? (int) Options::get('pagination') : 5; } // Remove the LIMIT if 'nolimit' or 'month_cts' is set if ( isset( $nolimit ) || isset( $paramset['month_cts'] ) ) { $limit = ''; }