Skip to content

Instantly share code, notes, and snippets.

@lauhakari
lauhakari / wp-pagination-url.php
Last active December 28, 2021 01:07
Change the pagination url in Wordpress (3+) You can put in a plugin file or your functions.php.
<?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 ;)
}