Easy and Quick Way to Delete Category from WordPress URL

4 cách xóa category trong URL WordPress đơn giản, nhanh chóng

WordPress developers often add /category/ URLs to identify sites with /tag/. However, if you find your category URL ugly and want to remove it to make your website more professional and easier to SEO, there are several ways to do it. You can use plugins like Yoast SEO or Rank Math SEO to remove the category snippet from the URL. Alternatively, you can use the Remove Category URL plugin or edit the .htaccess file. Additionally, you can also remove parent category slugs from WordPress URLs by adding code to the functions.php file in your theme. It’s important to set up proper redirects to avoid affecting SEO.

Are you looking to "remove category" from your WordPress URL to enhance the professionalism and SEO of your website? Here are some easy methods to achieve that without causing any errors on your WordPress page.

How to delete category in WordPress URL

There are 4 ways to remove /category/ from your category URL, choose the most convenient one for you:

  1. Remove /category/ in URL using Yoast SEO plugin: Utilize the SEO by Yoast plugin and navigate to SEO menu -> Search Appearance -> Taxonomies to remove the category snippet in the link.

  2. Remove category in WordPress URL with Rank Math SEO plugin: If you prefer Rank Math plugin, go to Rank Math -> General Settings -> Links and switch on Strip Category Base to delete /category/.

  3. Remove /category/ with Remove Category URL plugin: Install the Remove Category URL plugin if you don’t have Yoast SEO or Rank Math. The plugin automatically removes «category» from the URL and sets up redirects.

  4. Remove /category/ in URL using .htaccess file: Add the code below to your .htaccess file to delete the category quickly:
    RewriteRule ^category/(.+)$ http://domain.com/$1 [R=301,L]

After addressing the category removal, you can also simplify your category links by removing parent category slugs using the code provided.

See also  Adding annotations to WordPress articles made easy with these simple steps.

How to Remove /category/ and Parent Category Slug from WordPress URLs

Follow the instructions and code provided above to make your category URLs cleaner and more concise. Remember not to shorten the URL excessively to avoid duplication issues.

So, by following these methods, you can effectively "remove category in WordPress URL" and improve the overall SEO and user experience of your website. If you need more insights or tips related to WordPress, feel free to explore our other articles. Your feedback and comments on WordPress tips are always welcome. Happy optimizing your WordPress URLs!

5/5 - (1 vote)

Related posts