|
/ Documentation /Developers Documentation/ Customize Meta Description Length surerank_description_length

Customize Meta Description Length surerank_description_length

Hook: surerank_description_length

Description: This filter changes the description-length threshold exposed to SureRank editor-side checks. The default is 160 characters. It does not truncate descriptions or determine search snippet length; server-side analyzers may use their own fixed constant.

Source: inc/functions/get.php

Accepted Value: int — Desired editor-side check threshold in characters.

Example:

PHP
// Change the editor check threshold (default: 160 characters).
add_filter( 'surerank_description_length', function() {
    return 180; // Set the check threshold to 180 characters.
});

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