rolandbaer / list-last-changes

Shows a list of the last changes of a WordPress site.
GNU General Public License v3.0
1 stars 2 forks source link

Only up to 5 posts excluded #17

Closed rolandbaer closed 2 years ago

rolandbaer commented 2 years ago

posted by user madideas on wordpress.org (https://wordpress.org/support/topic/exclude-posts-bug/):

When you call get_posts() on line 76 to find out which ones to exclude, the default is to only return 5 and hence you can only exclude 5 posts. Need to add the parameter for ‘numberposts’ => -1 to get all the excluded posts. Not sure if the same problem will apply to excluding pages as I only discovered this issue while trying to exclude posts.

rolandbaer commented 2 years ago

According to the documentation (https://developer.wordpress.org/reference/functions/get_pages/) the pages should not be affected as the default for numbers is 0 ("number (int): The number of pages to return. Default 0, or all pages").