Jul 12, 2011

Wordpress Remove Pagination

Ok to remove pagination only from archives page, just past the below snippet to functions.php file

[php]

function no_nopaging($query) {
if ( !is_home() && !is_feed() && '' === $query->get('nopaging') )
$query->set('nopaging', 1);
}

add_action('parse_query', 'yay_nopaging');

[/php]

If you want to remove from other pages, then just change the if condition.

No comments :

Post a Comment