Calender only showed 10 events (default posts/page). Fixed it, here's how
first of all – thank you for this plugin. It works nicely (see it in action @ risobrasil.nl).
However, I wrecked my brain why it would only show 10 events. It turns out, the WP_query you use, used the selected number of posts per page.
You can adjust this at Settings > messages. It shows the default value ’10’. You can just set this to all, but that will mess your site up if you’re working with pagination.
The fix is as follows: in simpulevents.php, in the root folder of the plugin, find this bit:
$args = array('post_type' => 'events', 'post_status' => 'published', 'order_by' => 'meta_value', 'meta_key' => $this->meta_prefix . "date_begin", 'order' => 'ASC',
Just add an extra parameter of the arguments:
'posts_per_page' => -1,
This will override the max 10 posts bit, and gets all the posts (events). The parameter used to be ‘showposts’ btw, but that is deprecated.
Hope this helps somebody, and perhaps it’s good stuff for an update?
- The topic ‘Calender only showed 10 events (default posts/page). Fixed it, here's how’ is closed to new replies.