Posted By

burnandbass on 03/18/15


Tagged


Versions (?)

Rewrite pagination slug in Wordpress


 / Published in: PHP
 

Rewrite "page" to "p" so /page/10 becomes /p/10

  1. function custom_pagination_base()
  2. {
  3. global $wp_rewrite;
  4.  
  5. $wp_rewrite->pagination_base = 'p';
  6.  
  7. $wp_rewrite->flush_rules();
  8. }
  9.  
  10. add_action('init', 'custom_pagination_base', 1);

Report this snippet  

You need to login to post a comment.