Filter: bricks/query/result_max_num_pages
This filter allows you to modify the query result maximum number of pages (@since 1.9.1). This value is used for the Pagination element as well.
add_filter( 'bricks/query/result_max_num_pages', function( $max_num_pages, $query_obj ) { // Return: Element ID is not "lbsijo", nor is it a post query if( $query_obj->element_id !== 'lbsijo' || $query_obj->object_type !== 'post' ) { return $max_num_pages; }
// Perform your logic here // Use $query_obj->query_result to access the query result $max_num_pages = 3; return $max_num_pages;}, 10, 2 );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Please do not include passwords, license keys, or personal data. We store submitted notes to improve the docs.
Thanks for sharing feedback. We're using it to improve these docs.