Last active
May 12, 2018 16:21
-
-
Save pogla/647d94735c2974ae32a54d513436b1a4 to your computer and use it in GitHub Desktop.
Rename page in pagination url
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
/*Change url page to stran*/ | |
if ( ! function_exists( 'lr_page_to_seite' ) ) | |
{ | |
register_activation_hook( __FILE__ , 'lr_flush_rewrite_on_init' ); | |
register_deactivation_hook( __FILE__ , 'lr_flush_rewrite_on_init' ); | |
add_action( 'init', 'lr_page_to_seite' ); | |
function lr_page_to_seite() | |
{ | |
$GLOBALS['wp_rewrite']->pagination_base = 'stran'; | |
} | |
function lr_flush_rewrite_on_init() | |
{ | |
add_action( 'init', 'flush_rewrite_rules', 11 ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment