0

I want to remove page slug for all pagings.

For home page

  • Old: www.x.com/page/4
  • New: www.x.com/4

For Category page

  • Old: www.x.com/category1/page/4
  • New: www.x.com/category1/3

How can I achieve it? Or is there any simple plugin for it?

  • You may find your answer here. Change the “page” slug in pagination – Robert hue Oct 28 '14 at 6:22
  • Bu this is not "change" question does using this strategy for "removing" creates side effect? – ozz Oct 28 '14 at 7:01
  • You could edit the WP database directly (after backing it up) if you can't find a plugin. – barrycarter Oct 28 '14 at 16:48
-1

Add this code to your functions.php and please re-save your permanent link page and do not forget 301 redirects

add_action( 'init', 'remove_page' );

function remove_page(){
    global $wp_rewrite; $wp_rewrite->pagination_base = "";
}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.