Pagination Doesn’t Work
-
Hi, I’m testing out Download Monitor 4.1.0 on WP 4.9.8. I was trying out the pagination functionality of the downloads shortcode and found it doesn’t work. A sample of the attributes I’m using (I’ve tried it both with and without offset set):
per_page =”6″ orderby=”title” order=”asc” paginate=”true”
I’ve tried this with each of the available templates. It displays the page links correctly, but if you click on a link, the page goes to the new URL but continues to display the first page of files.
In digging around in the plugin code I found that both Shortcodes.php and pagination.php are trying to get the current page using get_query_var( ‘paged’ ). But get_query_var() only returns values from the global $wp_query (https://codex.ww.wp.xz.cn/Function_Reference/get_query_var) — and $wp_query isn’t being used to output the downloads. The entity you need the current page information for is the $downloads array.
I’m hoping you can take a look at this when you have an opportunity and adjust the pagination functionality. Thanks for the work you’ve done on Download Monitor — it’s very useful and I’d love to be able to use it for a project.
The topic ‘Pagination Doesn’t Work’ is closed to new replies.