jebu1104
5/8/2015 - 4:32 PM

Remove pagination for custom post types

Remove pagination for custom post types

/** Remove Pagination from CPT**/
add_action('parse_query', 'cd_nopaging');
function cd_nopaging($query) {
    if (is_archive()) {
        $query->set('nopaging', 1);
    }
}