-
-
Save wpsmith/5177901 to your computer and use it in GitHub Desktop.
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 | |
add_action( 'pre_get_posts', 'smythe_no_paging' ); | |
/** | |
* Remove pagination from all archive pages | |
* | |
* @author Travis Smith | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/customize-the-wordpress-query/ | |
* @param object $query data | |
* | |
*/ | |
function smythe_no_paging( $query ) { | |
if( $query->is_main_query() && $query->is_archive() ) { | |
$query->set( 'nopaging', true ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment