• Resolved emi662002

    (@emi662002)


    Hi! I’m working with this plugin and i have a problem:

    for posts in categories (not at home) and this happens only in the web server, on my local development server i dont have this problem:
    the next link href is: /?cat=3%3Fcat%3D3&paged=2

    as you can notice, the ‘?cat=3’ its repeated and url encoded cause there already is a ‘?’ for the querystring

    any ideas??

    Thanks in advance!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter emi662002

    (@emi662002)

    and also this happens only in the first page, if i go to another page writing the right link, i can go back and forth with no problems

    Thread Starter emi662002

    (@emi662002)

    i figured out a way to fix it, inside the plugin

    it appears to be a problem with the

    esc_url(get_pagenum_link($page + 1)

    this is the fix

    $nextlink = ($this->type === 'posts')
    				? esc_url(get_pagenum_link($page + 1))
    				: get_comments_pagenum_link($page + 1);
    
    			if($page == 1 && $this->type === 'posts' && $_GET['cat'] != ""){
    				$nueva_pag = get_query_var('paged') + 1;
    				$nextlink = get_category_link($_GET['cat']) . "&paged=" . $nueva_pag;
    			}

    and the same for the loop for the links

    Plugin Author Eric

    (@emartin24)

    WP-Paginate is using the internal WP functions, so I’m not sure that it is an issue with the plugin, but perhaps WP or your code?

    Thread Starter emi662002

    (@emi662002)

    yes, i noticed so while i was trying to figure out what was wrong.

    maybe its something with my loop, cause i have a customized query. it works now with the fix mentioned above, i know its not the best solution, and its not recommended but its the easiest until i can go further with the investigation.

    Thanks for the reply!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP-Paginate] wrong link’ is closed to new replies.