Last active
April 26, 2017 11:07
-
-
Save cdils/3c211edf45488c253118 to your computer and use it in GitHub Desktop.
Remove Pagination from an archive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //remove this entire line | |
// Remove Pagination from a custom post type | |
add_action( 'parse_query', 'cd_nopaging' ); | |
function cd_nopaging( $query ) { | |
if ( is_post_type_archive( 'your-cpt' ) ) { | |
$query->set( 'nopaging', 1 ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment