|
/ Documentation /Developers Documentation/ Customize Category URL Structure surerank_remove_category_base

Customize Category URL Structure surerank_remove_category_base

Hook: surerank_remove_category_base

Description: This filter allows you to clean up your category archive URLs by removing the default /category/ base. It’s useful for creating shorter, more SEO-friendly URLs.

Source: inc/frontend/crawl-optimization.php

Usage: Enable this filter to strip the /category/ base from category archive URLs. Back up and test on staging, check for URL conflicts and redirects, then save Settings > Permalinks once to regenerate rewrite rules.

Example:

PHP
// Remove the default 'category' base from category URLs using SureRank.
add_filter( 'surerank_remove_category_base', '__return_true' );

You can add the example code to your child theme’s functions.php file or use a plugin like Code Snippets to safely insert custom code. Using a code snippet plugin is recommended for easier management and to ensure the code remains active even if you switch themes.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Table of Contents
Scroll to Top