Last active
January 6, 2022 12:51
-
-
Save johanguse/ad5687bd1f1fce83d7e31fe91f89900f to your computer and use it in GitHub Desktop.
Translate pagination base slug url on WordPress
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
//https://wordpress.stackexchange.com/questions/57070/change-the-page-slug-in-pagination | |
function re_rewrite_rules() { | |
global $wp_rewrite; | |
$wp_rewrite->author_base = 'autor'; | |
$wp_rewrite->search_base = 'buscar'; | |
$wp_rewrite->comments_base = 'comentarios'; | |
$wp_rewrite->pagination_base = 'pagina'; | |
$wp_rewrite->flush_rules(); | |
} | |
add_action('init', 're_rewrite_rules'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment