Title: Setting the limit
Last modified: September 1, 2016

---

# Setting the limit

 *  [AdrianB](https://wordpress.org/support/users/adrianb/)
 * (@adrianb)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/setting-the-limit/)
 * I have over 200 sites in my network but since the default limit for `wp_get_sites()`
   is 100 then the list of sites generated by `mpd_wp_get_sites()` i limited to 
   100 sites. A suggested feature would be a setting in Multisite Post Duplicator
   that is used as the limit argument.
 * (I manually added the limit I needed, so I’m good, this is just a suggestion 
   for others who are wondering why not all sites are showing up in the Multisite
   Post Duplicator metabox.)
 * [https://wordpress.org/plugins/multisite-post-duplicator/](https://wordpress.org/plugins/multisite-post-duplicator/)

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

 *  Plugin Author [MagicStick](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-7576064)
 * Thanks Adrian. I’ll look into a way of making this configuration easy for our
   users.
 * Nice one!
 *  Plugin Author [MagicStick](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-8207453)
 * Hi Adrian. I’m about to release an update which supports wordpress’ new `WP_Site_Query()`
   class.
 * [https://developer.wordpress.org/reference/functions/get_sites/](https://developer.wordpress.org/reference/functions/get_sites/)
 * I think this will solve your problem as the limit `$args['number']` on the query
   is defaulted to null (no limit). After my update can you have a wee check and
   confirm for me?
 * Many thanks.
 * Mario
 *  Thread Starter [AdrianB](https://wordpress.org/support/users/adrianb/)
 * (@adrianb)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-8207489)
 * Yes, I can do that and report back!
 *  [ihackinjosh](https://wordpress.org/support/users/ihackinjosh/)
 * (@ihackinjosh)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-8745348)
 * [@adrianb](https://wordpress.org/support/users/adrianb/) how did you manually
   change to have all sites viewable? I have over 200 sites too and i need them 
   to all show.
    I am stuck on an older version until I can make the newer version
   work with my current setup. Your wisdom is greatly appreciated.
 * [@magicstick](https://wordpress.org/support/users/magicstick/) maybe you know
   how to do it too.
 * Thanks for your time and help
 *  Plugin Author [MagicStick](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-8745360)
 * Hi ihackinjosh. If you have WordPress > 4.6 and are running the latest version
   of my plugin you will see all of your sites! 😉
 *  [ihackinjosh](https://wordpress.org/support/users/ihackinjosh/)
 * (@ihackinjosh)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-8745387)
 * [@magicstick](https://wordpress.org/support/users/magicstick/) I had some custom
   work done for me and it does not work it i update the plugin unfortunately i 
   am stuck on 0.9.3. Until i can figure out how to update the changes to work on
   the newest version. In the mean time is there a work around for me.
    I’m on 4.7
    -  This reply was modified 9 years, 3 months ago by [ihackinjosh](https://wordpress.org/support/users/ihackinjosh/).
 *  Plugin Author [MagicStick](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-8745412)
 * That’s unfortunate! Can you send me your moded v0.9.3 and I’ll look into getting
   it working on the latest version?
 *  [ihackinjosh](https://wordpress.org/support/users/ihackinjosh/)
 * (@ihackinjosh)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-8745419)
 * that would be awesome [@magicstick](https://wordpress.org/support/users/magicstick/),
   how do you want me to sent it to you?
    -  This reply was modified 9 years, 3 months ago by [ihackinjosh](https://wordpress.org/support/users/ihackinjosh/).
 *  Plugin Author [MagicStick](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-8745442)
 * Link me up on my email mariojaconelli at gmail 🙂
 *  Thread Starter [AdrianB](https://wordpress.org/support/users/adrianb/)
 * (@adrianb)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-8745473)
 * [@ihackinjosh](https://wordpress.org/support/users/ihackinjosh/) If you just 
   want to do a quick hack of the plugin you could try change line 635 of inc/mpd-
   functions.php from this:
    `$args = array('network_id' => null);` to something
   like this (in this case setting the limit to 250 sites): `$args = array('network_id'
   => null, 'limit' => 250);` This is untested, I don’t have my original change 
   around, but I assume it was something like that.
 * [@magicstick](https://wordpress.org/support/users/magicstick/) Sorry for not 
   getting back, I said I was going to test the new version, but I still have not
   done that. (I only needed the change for a little while, and I’m not using the
   plugin actively at the moment.)
    -  This reply was modified 9 years, 3 months ago by [AdrianB](https://wordpress.org/support/users/adrianb/).
 *  [ihackinjosh](https://wordpress.org/support/users/ihackinjosh/)
 * (@ihackinjosh)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-8745675)
 * thanks for the suggestion [@adrianb](https://wordpress.org/support/users/adrianb/)
   but sadly that did not fix the sites, it kept if the same. Thanks again for your
   help and time.
 *  [ihackinjosh](https://wordpress.org/support/users/ihackinjosh/)
 * (@ihackinjosh)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-8746099)
 * [@adrianb](https://wordpress.org/support/users/adrianb/) any other suggestion
   while [@magicstick](https://wordpress.org/support/users/magicstick/) works on
   solving my issues with the old version.
 *  Thread Starter [AdrianB](https://wordpress.org/support/users/adrianb/)
 * (@adrianb)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-8746908)
 * Sorry, no. If your issue is that you only get 100 sites, then there is only one
   place where `wp_get_sites()` is called AFAIK, so I don’t see any other way to
   change the limit but that $args array.

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

The topic ‘Setting the limit’ is closed to new replies.

 * ![](https://ps.w.org/multisite-post-duplicator/assets/icon-128x128.png?rev=1562920)
 * [Multisite Post Duplicator](https://wordpress.org/plugins/multisite-post-duplicator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multisite-post-duplicator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multisite-post-duplicator/)
 * [Active Topics](https://wordpress.org/support/plugin/multisite-post-duplicator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multisite-post-duplicator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multisite-post-duplicator/reviews/)

 * 13 replies
 * 3 participants
 * Last reply from: [AdrianB](https://wordpress.org/support/users/adrianb/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/setting-the-limit/#post-8746908)
 * Status: not resolved