Skip to content

Instantly share code, notes, and snippets.

@pogla
Last active May 12, 2018 16:21
Show Gist options
  • Save pogla/647d94735c2974ae32a54d513436b1a4 to your computer and use it in GitHub Desktop.
Save pogla/647d94735c2974ae32a54d513436b1a4 to your computer and use it in GitHub Desktop.
Rename page in pagination url
/*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