Simpul Events by Esotech
Calender only showed 10 events (default posts/page). Fixed it, here's how (2 posts)

  1. rnacken
    Posted 3 years ago #

    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?


  2. geilt
    Plugin Author

    Posted 3 years ago #

    Thanks for the update. I will add a option in the Calendar menu to modify posts per page as well. You are correct in that it uses the blogs default.

    Couple other fixes to come as well.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simpul Events by Esotech
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic