Remove/hide a specify category-name from the url

WordPress Development Asked by andresgl on January 4, 2022

I have several categories post:


The posts url are in the following format:


But I would like to hide from the URL the category name ‘general’ so for example.

instead of


I have tried some wiring a rewrite rule in the .htaccess but doesn’t work.

Any idea how can I do it?


2 Answers

Have you tried following Rewrite rule in your .htaccess ?

RewriteRule ^category/(.+)$ http://YOUR_SITE_NAME/$1 [R=301,L]

Answered by JItendra Rana on January 4, 2022

You can use post name in your permalinks setting. And for Category Base and Tag Base make it blank

Hope this will help

Answered by Aftab on January 4, 2022

Add your own answers!

Related Questions

Co-authors plus problems with query_post

1  Asked on October 30, 2021 by wallace-ferreira


wp_get_archives() not working for my custom post type

1  Asked on October 30, 2021 by best-dev-tutorials


Run Username SQL Query from WordPress Child Theme Functions File

1  Asked on October 30, 2021 by moa-andersen


Change wordpress admin home page

1  Asked on October 30, 2021 by bendict-mutua


How to move a post from one category to another

1  Asked on October 30, 2021 by sajeergraphix


Query custom post type custom meta key

1  Asked on October 30, 2021 by user1551496


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP