In my opinion, deprecating numberposts
would not make sense, as numberposts
is used to query x amount of posts, whilst posts_per_page
is used to denote how many posts per page are being shown during pagination. If you were to deprecate numberposts
in favor of simply posts_per_page
, then pagination would not exist.
ie:
"numberposts" => 50, "posts_per_page" => 10
a total of 50 posts to query, 10 posts per page, giving 5 pages of 10 posts each.
removal of numberposts
:
"posts_per_page" => 50
a total of 50 posts to query, 50 posts per page (since it copies the value of numberposts
to posts_per_page
), giving 1 page of 50 posts and no pagination.
Let me know if I’m just reiterating what you’re already aware of, and I’m just slightly confused by the question.
Related Posts:
- Nested meta_query with multiple relation keys
- How can I save an array from a random post sequence for later use?
- All-in-One Event Calendar: Custom Query – Getting each event Instance [closed]
- Is there an action/filter called when WP_Query->query is finished and assigns posts
- Limit search results to exact match
- Highlighting Sub topic in a post?
- Pagination Not working on Home Page with 2 Query
- Multiple keyword search
- Get number of comments after modifying comment query
- Show default content if custom WP_Query has no posts
- Include Sticky Posts with Custom Query
- $wpdb->insert inserting two rows in database
- Create unique page without header.php for json feed
- Sub-loop / nested loops Best Practices
- How to loop for every result found in the_content() when using the search query?
- Is there any advantage of using default WordPress Search instead of creating a custom one?
- Order By table field comment_status in WordPress > 4.0
- Clean up WordPress code that repeats
- How to optimize multiple WP_Query() calls on one page?
- Use post object from first query in second query
- Query to get siblings and parent page
- How to list custom fields as headers and list all pages sharing that custom field under it?
- Cutom wp_query for geolocation search, pagination not working
- Include data from custom table in WP_Query
- echo a specific meta_key queried through a custom post
- WP Group posts by year(desc) > month(desc) > date(asc)
- How to order posts on each different category?
- Get specific ACF key and value from all posts – no access to DB
- Orderby two meta fields not working
- Custom wp_query – I’m getting ‘all’ post, not the specific post in the query
- meta_query with array as value with multiple arrays
- Adding pagination to sub-wp_query within a singular post page
- Magazine style frontpage with multiple categories/loops and no duplicate posts
- How to make a query returning pages from multiple parents
- Prioritising and Ordering Posts By Category Name Using A Custom Loop
- Where is this query?
- How to use wp query in my custom page without including header and footer in wordpress
- Custom order revolution sliders post base slides as inserted in Specific Posts List field
- WP Query for all events prior to current date
- How to extend WP_query to a specific table?
- Display the search results like the original pages
- Multi line of $wpdb->query just run 1 time and end the loop right after
- Add to search posts query array with post IDS which will appear first
- Woocomerce – Order products by float attribute in archive pages
- Multiple values in WP_Query : category__and
- How to set up pagination for a custom loop on a global template (author.php, tag.php, archive.php?)
- Custom query using WP_Query is not working
- Limit the number of posts from a specific category on index.php
- Get the type of an advanced custom field (ACF) in a WP_Query loop [closed]
- Switched from query_posts to wp_query, pagination no longer working
- WP_Query breaks pagination
- Pagination problem with multiple loops on the same page
- shortcode with $atts with strange results
- Get comment number by date range?
- I need to get all categories from a WP_Query
- Show posts without term
- Hook/action after WP_Query gets posts to query custom tables for post-related meta
- WP_Query to show post from a category OR custom field
- Add the “active” class only to the first loop item in a WordPress query [closed]
- Display Posts by modifying the where clause only for my query
- Pagination causes error 404 when used with front-page.php
- Using AJAX to return search form results
- How to get a category in a list item class
- Finding post content that begins with a specific character
- SQL Query inside Widget
- Use ‘parse_query’ filter to show posts that from multiple criteria
- Get posts for last working week in WP_Query
- how to link to detail page(single.php?) in a wp_loop
- Meta Query Array Error 500
- Get pagination working for custom loops within page templates
- Complex WP SQL Query
- How to store and receive variables in WP sessions?
- How to list posts with disabled/closed comments, with pagination?
- how would i change post->ID to work correctly when querying pages?
- WP User Query with Custom Fields and Search Results
- Event with multiple dates, display events chronologically
- WP_Query order by not working properly due to category I believe
- WP_Query to get post on frontpage
- When listing child pages run out of memory
- Function to retrieve IDs of posts, cache results, and improve wp_query
- Search.php – return number of results but cannot loop through
- How to get pages of parent (non-recursive)?
- Show X taxonomies of the latest published posts
- Combine query in WP_User_Query()
- Custom wp_query inside a conditional stament inside a template part doesn’t work: why?
- Check the stored / cached WP_Query with transients on post change
- New template file does not load category-specific post
- WPQuery loop not giving expected output
- WordPress tax_query ignoring relation OR
- pagination functions are not working
- Wrap group of wp query posts to parent div by date/year
- Continue loop after $queryObject
- Order Posts By Youtube Views
- Declare inline background image in functions.php
- loop through custom post types with meta data
- Looking for a way to exclude frontpage and nav menu from query filter
- Using Query In Post Type Archives
- WP Query Obj: Set value to be unequal | Hide media by admin
- Pagination only showed when no category is set in wp_query
- taxonomy-{term}.php terms pagination returning 404 after a certain page