|
/ 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 value exposed to the editor. In this release the live page check still compares the description against 160 characters. The filter does not change that warning cutoff.

Source: inc/functions/get.php

Use an integer character count. The live page description-length warning still uses 160 characters in this release.

Example:

PHP
// Change the description-length value exposed to the editor (default: 160 characters).
add_filter( 'surerank_description_length', function() {
    return 180; // Return 180 for the editor’s length value.
});

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