This seem to work. Put in your functions.php
:
add_filter('pre_get_posts', 'limit_pages');
function limit_pages($query) {
$query->max_num_pages = 5;
if ($query->query_vars['paged'] > 5) {
$query->query_vars['paged'] = 5;
$query->query['paged'] = 5;
}
return $query;
}
But I guess you would still need some workaround for posts pagination and authors. Hope it helps you a little.
Related Posts:
- What is the difference between $paged and $page?
- Limit number of pages that use a specific template?
- Custom Search Page Pagination Not Working
- Get next/previous cousin page
- Pages views limit [closed]
- How to add pagination to a single wordpress page with lot of text
- Later blog post pages give 404 error
- advanced paging in wordpress
- Add pagination to search.php page
- Pagination For Page Post Type
- Page loads all pages of the image gallery with pagination
- Paginate Links not working
- pagination does not work with query_posts. Help! [duplicate]
- How can I cycle posts with a #next and #previous script?
- Show different number of posts on second page of category
- Add tags to long page that is broken up into subpages?
- How to disable posts and use pages only
- I want only my sub-pages to be clickable in the navbar
- How restrict page for users logged? [closed]
- Only allow new subpages to be created
- How do I turn comments off for pages, but not posts?
- Static files or dynamic WP pages for “static content”?
- When paginating a Page with the tag, how can the 2nd and subsequent page styles be customised?
- Redirect “Sorry, you are not allowed to access this page.” to Home
- select a private page as parent for another private page
- Can I set a timer for pages to be published?
- Add a Menu Link (to a WordPress Page) in the Admin Menu/Sidebar
- Too Many Pages in WordPress? 2013
- How to use the same code for multiple pages?
- Is there a way to create a URL (new WP page) that can only be accessed from a specific source?
- Job Manager plugin help?
- htaccess modify headers IF url ends with “news”
- How to change only the home page / front page url on wordpress
- Give access to a simple .html file to users that bought a specific ‘digital product’
- Dash after page title
- How to make tag post listing page working?
- Admin pages, edit notes of the title of posts and pages
- Can’t get done anything with admin.php response
- Role – edit page but not publish
- Unique page URL redirect to file_get_contents() at domain
- Cannot add a class to h2 tag
- Redirect page to default subpage
- WordPress pages creation work distribution & then combining – Localhost XAMPP
- How can I check user capability when a page loads (via functions.php)?
- Add a static page that links to homepage
- How to have a next page for post?
- Can I change the “Home” text in the menu?
- Search child pages from a specific page parent
- How to disable delete option for a specific page? [closed]
- Remove_filter (‘the_content’, ‘wpautop’) only pages
- Weebly Migration to WordPress [closed]
- Need to create a custom page on a website
- How To Render Shortcode In AJAX Response?
- How to create different template designs for different pages in WordPress [closed]
- How to limit page pagination… again
- Do I have to widgetize my pages?
- Page templates in subdirectories and auto generator
- Get rid of “comment” field on non-blog pages [duplicate]
- How to control display of page lists on sidebar that doesn’t have childrens
- Is there a template tag/function for getting the URL (or slug or name or ID) of the blog page when using a “static” front page
- Problems in creating a static site with WordPress
- Creating new page/tab in groups section not working! [closed]
- Change displayed “page name” to distinguish multiple pages with the same title
- Add separate list of pages under Admin
- add title to widgets of wordpress
- Custom user tables not working after migration
- remove “Edit” from select pages
- Add custom action to the page listing screen
- How to list pages from an author?
- How can a .css file be applied to a virtual page?
- WordPress blog posts template bug [closed]
- Checkboxes to automatically create pages when I activate a theme
- Cannot update page – with too many characters?
- Is it possible to embedd this web app to my website [duplicate]
- Using external DB within wordpress
- Cannot use old slug – it just 301s to site home page
- include exception inside theme for empty widget area
- My pages disappeared from the list
- Pre-populating new Page creation with shortcodes
- Paginations in Category Page Leads to Sample Pages
- WordPress Pages “allow comments” meta option can’t be checked
- How to display time when page is created and edited
- Loading internal page
- Firing page_publish where page is child page
- Group Pages based on Parent in Admin Area
- Google indexed pages for one page site
- static page with buton that opens collect email form
- How to display a paginated list of posts from one category on a page? [duplicate]
- Parent for a single (single.php)
- Create a new page for each form selection
- How to create an user defined page?
- How can one get page by pagename if it is a child page?
- Archive with specific keyword by category sorted by date
- Is it possible to keep the page title from actually appearing at the top of the page?
- Missing page on wordpress “Pages” dashboard [closed]
- Split Page Links
- Ask for template when adding a new page
- How to view front-end of WordPress website, using Atom?
- Can’t create new pages in wordpress
- Custom template is not showing up in templates dropdown list after re-naming it