I am new to wordpress so i am facing a problem in removing /category/ from wordpress URL


So i would like to know how to remove /category/ from the url. I have tried various solutions like

Go to Settings >> Permalinks and select Custom and enter: /%category%/%postname%/
Next set your Category Base to /

But even after doing this i am not able to remove the /category/ from the URL.

Any help would be appreciated



5 Answers 5


There is a plugin for that called WP No Category Base. As the name suggests this plugin will completely remove the mandatory 'Category Base' from your category permalinks ( e.g. myblog.com/category/my-category/ to myblog.com/my-category/ ).



I recommend one of these two plugins to get the job done

Wordpress SEO has the abillity to remove the /category/ base and many other valuable features.



I found this handy solution which you can use without plugin.


function fix_slash( $string, $type ) {
  global $wp_rewrite;
  if ( $wp_rewrite->use_trailing_slashes == false ) {
    if ( $type != 'single' && $type != 'category' )
      return trailingslashit( $string );

    if ( $type == 'single' && ( strpos( $string, '.html/' ) !== false ) )
      return trailingslashit( $string );

    if ( $type == 'category' && ( strpos( $string, 'category' ) !== false ) ){
      $aa_g = str_replace( "/category/", "/", $string );
      return trailingslashit( $aa_g );
    if ( $type == 'category' )
      return trailingslashit( $string );
  return $string;

add_filter( 'user_trailingslashit', 'fix_slash', 55, 2 );
  • 2
    The above doesn't work for sub-categories, though... eg. www.site.com/main-category/sub-category/. Returned a 404 error page
    – Giraldi
    Commented Jan 13, 2015 at 12:24

I recommend CS Remove Category Base plugin to get the job done.


You can undoubtedly remove /category/ slug from your page WordPress URLs using this plugin.

I hope it's useful to you.


Select Custom Structure in permalinks and add /%category%/%postname%/ after your domain. Adding "/" to the category base doesn't work, you have to add a period/dot.

I wrote a tutorial for this here: remove category from URL tutorial

  • You should add important info inside your answer and not a link to where someone might find the relative info :-) Commented Aug 17, 2015 at 6:59
  • This does not work for pagination in version 4.6.1 Commented Oct 28, 2016 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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