Limit the number of pages created by the paging

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.

Show pages and articles in category search result

To display pages in a category archive index: Add category taxonomy to the Page post-type Static pages, by default, do not have any taxonomies associated with them, including the category taxonomy. So you need to register the category taxonomy for the page post type, using register_taxonomy_for_object_type(): function wpse94150_register_category_taxonomy_for_page_post_type() { register_taxonomy_for_object_type( ‘category’, ‘page’ ); } add_action( … Read more

Dashboard–> All Pages “How to create folders?”

There are no page folders in WordPress, though that’s a good idea. Create subpages; that will give you a visual hierarchy, an also an automatic “breadcrumb” hierarchy, if useful. But you will still be able to organize pages in menus any way you want. See https://codex.wordpress.org/Pages And/or use CMS Page Tree View http://wordpress.org/plugins/cms-tree-page-view/ And Simple … Read more

Programmatically add a custom page/path/url/route to WordPress

The idea is just to programmatically create a path/url in a plugin for a WordPress site (like, “[mysite]/mypath”), and then load an arbitrary html or php file. In case anyone else is looking for something similar, this works for me (in my main plugin function file): register_activation_hook(__FILE__, ‘myplugin_activate’); function myplugin_activate () { create_custom_page(‘mytestpath’); } function … Read more