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
- What Is The Use Of map_meta_cap Filter?
- Need logged in users returing to site redirected to a separate page
- Widgets vs. Theme Mods
- Print shortcode in custom action hook not where the shortcode is entered
- simple expandable vertical menu, java script problem
- Custom search page and search by title, content and tag
- Pagination stops at page 6
- How do I override part of the main loop in my child theme?
- Best way to integrate an existing PHP application into WordPress
- Can I develop a WordPress site without a domain?
- How to extend customize control types to list pages
- How to get rid of from overbooking car rental website [closed]
- Advanced Custom Fields: Sorting custom columns with custom fields sorts only by date
- How do I move/order posts with a tag to the end?
- Multi Site installation inside a sub domain inside a sub directory
- Custom post type adds time/date and author to the post?
- Show all posts using the template page and the loop?
- How to use default WP form elements to interact with custom DB table?
- How do I add a promotional message to my posts?
- NextGEN Gallery – open all images on page in fancybox [closed]
- How to stop displaying the Id without losing the functionality
- Divi: how to hide/show specific menu according current page?
- “woocommerce_form_field()” function having issues after latest woocommerce update [closed]
- buddypress remove username from autocomplete
- When should I not use WordPress? [closed]
- How can i create menu like in the example?
- Can readers download zip files from WordPress sites?
- static page with multiple loops breaks post pagination
- Pagination in author, category, archive and tags pages does not work
- Any Good WordPress Client Like Live Writer To Create Static Pages
- WordPress homepage hangs in IE browsers
- How to disable Wp-PageNavi at the top of the page
- How to setup a membership system in WordPress?
- Numbered Pagination Showing The Same Posts After Altering WP_Query
- Custom permalink structure for posts in certain categories
- Hosing a website within a WordPress directory/folder
- Creating a dynamic URL for an external link inside content
- Custom Single Template
- how to auto fille conatct form 7 when user is logined
- How to use hook admin_init for add_action for custom post type column
- WordPress uploads directory. Featured Images storage
- Upgrade to 3.1.1 Fails