|
/ 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/archives.php

Usage: Enable this filter to strip the /category/ slug from all category archive URLs on the frontend.

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
On this page
Scroll to Top