Last active
December 28, 2021 01:07
-
-
Save lauhakari/5089252 to your computer and use it in GitHub Desktop.
Change the pagination url in Wordpress (3+) You can put in a plugin file or your functions.php.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', 'my_custom_page_word' ); | |
function my_custom_page_word() { | |
global $wp_rewrite; // Get the global wordpress rewrite-rules/settings | |
// Change the base pagination property which sets the wordpress pagination slug. | |
$wp_rewrite->pagination_base = "new-slug"; //where new-slug is the slug you want to use ;) | |
} |
@lauhakari I was afraid of that, but trying to be optimistic, thought I'd ask people who know way more about this than me....
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@saladgoat Yeah, not sure you can (easily) have different pagination_base's for different sections.
I believe that
pagination_base
is more used to change the base path on the whole site. :)