Put the following code in your functions.php
file.
function limit_posts_per_page() {
if ( is_author() ) // you can limit other pages as well ( i.e. is_archive() ), if need be.
return 5;
}
add_filter( 'pre_option_posts_per_page', 'limit_posts_per_page' );
Make sure your using the author.php
template, otherwise it wont work. Please have a look at twentyten’s author.php
for best practices.
Related Posts:
- Pagination Issues using WP_Paginate Plugin
- Custom query pagination with php parameter as arg problem
- WordPress Paginate $wpdb->get_results
- how to override woocommerce specific loop or archive-product.php [closed]
- How can I create an alternative home page?
- How do I prevent one of two multiple loops from repeating on a second page?
- pagination in woocommerce order history page
- Broken pagination
- Search results with custom loop don’t update when paged
- Pagination Not working on Home Page with 2 Query
- Custom Loop Pagination on WordPress
- Multiple Queries and Excluding Repeating Posts?
- Last post is not showing up
- get_option issues
- Show post page only if the user has bought a specific product
- Exclude custom taxonomy tag from loop
- Paginate Author’s Post List on Custom Author Page (ANOTHER THEORY)
- Loop through custom fields with similar label / common chars in label
- Why only one post (and no pagination) on this variation of the loop?
- CPT Loop with ACF and passing ID between Loops
- How can I display a PHP foreach loop’s answers by AJAX
- Pagination with an array of post objects?
- How do I paginate a get_posts() request inside another page loop (Paginating childpages)
- Hide text if not homepage
- Number of posts in the archive
- Is there a way to by-pass the pagination function on one custom template?
- website with pretty permalinks except pagination
- Displaying multiple post types on home page
- How to custom post navigation
- Pagination with custom field
- toggle Multiple Loop with tittle
- pagination broken – clicking next displays “page not found”
- Pagination for two loops
- Magazine style frontpage with multiple categories/loops and no duplicate posts
- Exclude current post but keep the same posts-per_page amount
- WordPress pagination with custom post type?
- wordpress custom fields loop
- How to show related post with category DESC (ASC) IDs of ID current post
- Avoid showing the same phrase in the loops
- Multiple loops on same category with different design
- Multisite – Getting Meta query to select from wp_2 tables
- How to append the excerpt to the content in the single post page?
- Multiple Owl Carousels on the same page with navigation problem
- Pull A Single Post Prior To Running wp_query
- Highlight specific user with custom field value
- custom loop issue
- Secondary loop doesn’t work
- WordPress custom search – pagination
- Pagination on Custom Loop
- Pagination is not working on custom query
- Displaying posts limit: can’t get pagination to display [duplicate]
- Pagination problem with multiple loops on the same page
- WordPress loop problem: Multiple loops, index.php and is_paged causing duplicate posts on next page
- Post thats in Two Categories, only want to display name for one
- Loop display only 5 posts
- Gallery Pagination by Row
- Custom Page Template and Category Exclusion
- Limitless amount of posts in custom archive page
- Advanced Custom Fields in WP_Query: Href Returning Empty
- Rename WooCommerce sorting dropdown options [closed]
- Change admin avatar only (without Gravatar or plugin)?
- How to start editing my site with WordPress?
- add_feed rewrite overwriting standard permalinks
- Loop in elementor custom widget not working
- How do I list custom taxonomy terms with the links?
- How can style text like this in wordpress
- How to unpixelate logo?
- Insert menu with a custom walker into page / post body using shortcode?
- Pagination broken after using 2 loops to show content
- Create a page that dynamically loads data
- Changing the the_author_posts_link() hover title
- Duplicated content with custom shortcode
- Customizer JS API get value of customizer field
- Change Notice of Password change email subject?
- Display a list of subcategories (from specific Category) a post belongs to
- Deleting my old WordPress site. – issues
- Implement a Walker with custom object rather than WordPress database object
- How I can directly add drop-down in my product on shop page as show in below image
- WordPress broken after domain name change
- Pagination on custom post type on front-page.php
- Trigger Customizer Publish (save) Action
- Good way to customize admin CSS?
- Is there a possiblity to replace profile image gravatar with custom user images
- Edit value=”” of a button in child theme
- Add the site’s name as prefix when adding new users? Multisite
- How to create “custom page types” with different custom fields in them?
- WooCommerce custom billing fields on email address
- When should I not use WordPress? [closed]
- css media query question [closed]
- Replacing words in WordPress or theme (not in content)
- How to create a page /1 using ?
- Is there a straight-forward way to provide a meta description tag via Yoast SEO, programmatically, without relying on the admin panel?
- Taking over my late husbands wordpress blog that we shared
- How to customize the WordPress 2014 theme, to have page using less horizontal margin?
- WordPress Child Theme Stylesheet being loaded before Parent’s minified .css
- How to create custom search page
- Open “Visit site” in a new window?
- get_template_directory_uri() not working
- How do I change the element using a custom function?
- Allow multisite admins only to create users with one specific user role?