Created
January 27, 2015 20:14
-
-
Save jester1979/d2ea34803008c7f1163f to your computer and use it in GitHub Desktop.
Set pagination base
This file contains hidden or 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
| add_action( 'init', array( $this, 'set_pagination_base' ) ); | |
| /** | |
| * Set pagination base for NL sites. | |
| */ | |
| function set_pagination_base() { | |
| if ( 'nl_NL' === get_locale() ) { | |
| global $wp_rewrite; | |
| if ( 'pagina' !== $wp_rewrite->pagination_base ) { | |
| $wp_rewrite->pagination_base = 'pagina'; | |
| $wp_rewrite->flush_rules(); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment