Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* delete pagination in category page */
- add_filter( 'jnews_get_content_attr', 'remove_category_pagination', 99, 3 );
- function remove_category_pagination( $attr, $category_page, $term_id ) {
- if ( 'jnews_category_' === $category_page ) {
- $attr['number_post'] = -1;
- $attr['pagination_mode'] = 'disable';
- }
- return $attr;
- }
- /* delete pagination in Tag archive page */
- function delete_pagination_all_archive( $query ) {
- if ( is_archive() && $query->is_main_query() ) {
- $query->set( 'posts_per_page', -1 );
- $query->set( 'nopaging', true );
- }
- }
- add_action( 'pre_get_posts', 'delete_pagination_all_archive' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement