• Resolved model13

    (@model13)


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    Thank you for your kind words.

    I just tested this and it worked without any issues. I assume some plugin or theme is changing the database queries. Can you please switch to default WordPress theme, disable all plugins and test again? If it works, then enable 1 plugin at a time and test again.

    Hello,

    There have been no replies to this topic, so I’m marking this as resolved. Please do let us know if you’re still experiencing an issue.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Pagination Doesn’t Work’ is closed to new replies.