Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

tribe_get_events() overrides ‘posts_per_page’

$
0
0

Replies: 0

Using the tribe_get_events() function, passing ‘posts_per_page’ as an argument with any number is ignored, and the function always returns the default number of events per page.

In /src/Tribe/Query.php, starting on line 1121, the getEvents() method is using wp_parse_args() and overriding $args with $defaults. Since ‘posts_per_page’ is set in $defaults, the same property in $args is being overridden.

Using the ‘posts_per_page’ setting is the first thing mentioned in the documentation, but it doesn’t work as described.

I am handling this via a counter variable, but I thought I’d bring it to your attention.


Viewing all articles
Browse latest Browse all 59525

Trending Articles