Title: Exclude posts bug
Last modified: September 4, 2022

---

# Exclude posts bug

 *  Resolved [madideas](https://wordpress.org/support/users/madideas/)
 * (@madideas)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/exclude-posts-bug/)
 * Nice little plugin, however there’s a problem: 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.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [rbaer](https://wordpress.org/support/users/rbaer/)
 * (@rbaer)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/exclude-posts-bug/#post-15981348)
 * Thanks for bringing up this problem. I have to admit that I’ve tested only a 
   few posts to exclude, not aware of the default of 5 posts of get_posts().
 * I’ve created an issue on GitHub where the development of this plugin takes place:
   
   [https://github.com/rolandbaer/list-last-changes/issues/17](https://github.com/rolandbaer/list-last-changes/issues/17)
 *  Plugin Author [rbaer](https://wordpress.org/support/users/rbaer/)
 * (@rbaer)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/exclude-posts-bug/#post-15981478)
 * In the version 1.0.1 this bug is fixed. Excluding pages was not affected by this
   problem as the used function get_pages() has a default for number is 0 (= all
   pages).
 *  Thread Starter [madideas](https://wordpress.org/support/users/madideas/)
 * (@madideas)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/exclude-posts-bug/#post-15983527)
 * Thanks for the quick fix!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Exclude posts bug’ is closed to new replies.

 * ![](https://ps.w.org/list-last-changes/assets/icon.svg?rev=2445615)
 * [List Last Changes](https://wordpress.org/plugins/list-last-changes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/list-last-changes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/list-last-changes/)
 * [Active Topics](https://wordpress.org/support/plugin/list-last-changes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/list-last-changes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/list-last-changes/reviews/)

## Tags

 * [exclude posts](https://wordpress.org/support/topic-tag/exclude-posts/)

 * 3 replies
 * 2 participants
 * Last reply from: [madideas](https://wordpress.org/support/users/madideas/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/exclude-posts-bug/#post-15983527)
 * Status: resolved