emi662002
Member
Posted 1 year ago #
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!!
emi662002
Member
Posted 1 year ago #
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
emi662002
Member
Posted 1 year ago #
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
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?
emi662002
Member
Posted 1 year ago #
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!