Support » Plugins » paginator (0.2.1) updated to paginate categories

  • Using the Paginator plugin, v0.2.1, by dzhus

    I had a request to paginate category content and, unless I’ve missed something, it doesn’t seem this plugin will do that out of the box. The suggestion that follows introduces one new line of code and modifies the string that’s passed to Paginator when instantiated. All happening in paginator.php’s wp_paginator() definition.

    just after $page is declared, set $cat

    $paged = intval(get_query_var('paged'));
    $cat = (intval(get_query_var('cat'))) ? ('cat='. intval(get_query_var('cat')) . '&') : '';

    then, instead of passing

    pag = new Paginator("paginator",' . $wp_query->max_num_pages . ',' . $pages_to_show . ',' . $paged . ',"' . get_option('siteurl'). '/?paged=");

    use this

    pag = new Paginator("paginator",' . $wp_query->max_num_pages . ',' . $pages_to_show . ',' . $paged . ',"' . get_option('siteurl') . '/?' . $cat . 'paged=");

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi. I appreciate your contribution. I took a look on the code you provided. I think, it is the way to deal with categories. I still need to provide the way to display paginator for search results, tagged posts, and archived posts. I will deal with that ASAP and will incorporate the results as part of the next release.

    Just wanted to give a quick update on the issue. The problem with search results, tagged posts, archived posts, and results for categories can be solved using modified version of get_pagenum_link(), but to address all of these at once it would be a good idea to modify the javascript code. I will do this ASAP and will release the modified version some time this week.

    Hello. I have released a new version of the plugin today. It should take care of the problem. Please let me know if there are any other concerns. Thank you again for your feedback

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘paginator (0.2.1) updated to paginate categories’ is closed to new replies.