[Plugin: jQuery-Pagebar] Problem with URLs
-
In jQuery-Pagebar 0.3.2.1, when you have an URL like this:
https://example.com?something=foobar
the plugin creates this URL:
https://example.com?something=foobar?paged=5
which should be
https://example.com?something=foobar&paged=5.
There is a simple fix that should solve this problem for good:
In jquery_pagebar.php,
find this code (line 148):
if(get_option('permalink_structure') != "") { if (is_search()) { $loc_href = '\''. $url .'&paged=\'+ ui.value ;'; }else { $loc_href = '\''. $url .'?paged=\'+ ui.value ;'; } } else { if (is_search() or is_archive()) { $loc_href = '\''. $url .'&paged=\'+ ui.value ;'; } else { $loc_href = '\''. $url .'/?paged=\'+ ui.value ;'; } }
and replace it with this:
if ( false === strpos($url, '?') ) $loc_href = '\''. $url .'?paged=\'+ ui.value ;'; else $loc_href = '\''. $url .'&paged=\'+ ui.value ;';
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: jQuery-Pagebar] Problem with URLs’ is closed to new replies.