If you really want to code the reviews manually, you can use the provided glsr_get_reviews()
helper function to get an array of review objects with their raw values. You can pass through the same options as in the shortcode, except for “class”, “hide”, “title”, and “schema” which are shortcode specific.
To find out more about the available helper function, see the help page in the Site Reviews “Get Help” menu.
To code custom reviews HTML INCLUDING custom pagination, you will need to the following more advanced method:
$paged = glsr_resolve('Query')->getPaged();
“$paged” will contain the current page number of the query.
$reviews = glsr_resolve('Database')->getReviews([
"assigned_to" => 13,
"count" => 10,
"pagination" => true,
]);
“$reviews” will contain an object with two values: The first ($reviews->reviews
) contains an array of review objects; the second ($reviews->max_num_pages
) contains the total number of pages in the query.
From these you can build your pagination.
You can also use the glsr_debug()
helper function to ease development. For example, glsr_debug( $paged, $reviews );
will print both variable to the page so you can inspect them.
I hope this helps.