Hello,
the pagination in my projects (portfolio) is not working. When clicking on page 2 it redirects to a 404 error.
I am not able to determine. Can you help and investigate?
Thank you in advance!
Sophie
Hey LeUP,
Could you try to reset your permalink settings under Settings–>Permalinks to see if that helps please?
Regards,
Rikard
Hey Rikard,
great, thank you. Resetting the permalinks did it.
But, I just recognized on portfolio archive page the URL of page 2 shows up “…/projekte/page/2/”. Same is with page 2 of blog archive page that shows up “…/aktuelles/page/2/. Both need to show up “…/seite/2/” instead of “…/page/2” . Can you tell how to achieve?
Thank you in advance, Rikard.
Regards
LeUP
Hi!
Please add this in the functions.php file:
function ava_rewrite_url() {
global $wp_rewrite;
$wp_rewrite->pagination_base = 'seite';
$wp_rewrite->flush_rules();
}
add_action('init', 'ava_rewrite_url');
Go to the Settings > Permalink panel. Save changes.
Best regards,
Ismael
Great! Thank you, Ismael! That works fine!
You can close this one out!