|
/ Documentation /Developers Documentation/ Customize URL Length Check Threshold surerank_url_length

Customize URL Length Check Threshold surerank_url_length

Hook: surerank_url_length

Description: This filter changes the URL-length threshold exposed to SureRank’s editor-side SEO checks; server-side analyzers may use their own constant. It does not generate, shorten, or change a URL slug.

Source: inc/functions/get.php

Usage: Use this filter to change the threshold for URL-length analysis, not to enforce a maximum URL or slug length.

Example:

PHP
// Set the URL length check threshold to 80 characters.
add_filter( 'surerank_url_length', function() {
    return 80;
});

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