Sorry, thats my English 🙁
Thanks alot! Will try it tomorrow.
And what about default number?

Iurii Smuglov
No worries 🙂 (And apologies for the delay in getting back to you on this…)
You can set a default number using similar code to that shown here: http://wp-event-organiser.com/documentation/developers/venue-meta-data-and-metaboxes/
(On the eventorganiser_save_venue
, check if it has the _order
meta key, and if not, add it with the appropriate default value).

Stephen Harris
Hi again, Stephen.
I have 9 pages, for example, but do not have enough posts to fill all the pages. How can I set the number of pages dynamically, depending on the number of posts?

Iurii Smuglov
Hi,
You can dynamically set the number
argument to the desired amount. If it i’ll depend on the total number of venues available then the following should get you that:
$all_venues = eo_get_venues();
$total_num_venues = ( $all_venues ? count( $all_venues ) : 0 );
But you are having to do two queries now (there’s no way around that) – so for performance reasons I’d probably recommend you just hardcode it unless the number of venues is likely to fluctuate. Of course, you can also cache the result and just clear the cache whenever a new venue is updated.

Stephen Harris