Home
/
Admin
/
Limit Meta Description to 160 characters
Duplicate Snippet
Embed Snippet on Your Site
Limit Meta Description to 160 characters
This filter limits the Meta Description to 160 characters throughout the website
php | |
| <?php
|
| add_filter( 'aioseo_description', 'aioseo_filter_description' );
|
| function aioseo_filter_description( $description ) {
|
| if ( strlen($description) > 160 ) {
|
| $description = substr($description, 0, 159);
|
| }
|
| return $description;
|
| }
|
| |
| |
Comments